Nagiosmobile passwords

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Nagiosmobile passwords

Post by BanditBBS »

So, where is nagiosmobile getting the authentication from? I login to nagiosmobile with my original password for XI. We have since changed to AD authentication and I'd love for nagiosmobile to use those same credentials, is that not possible?
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
User avatar
eloyd
Cool Title Here
Posts: 2190
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: Nagiosmobile passwords

Post by eloyd »

Code: Select all

# cat /etc/httpd/conf.d/nagiosmobile.conf
#modify this file to fit your apache configuration

Alias /nagiosmobile "/usr/local/nagiosmobile"

<Directory "/usr/local/nagiosmobile">
#  SSLRequireSSL
   Options None
   AllowOverride None
   Order allow,deny
   Allow from all

#  Allow from 127.0.0.1

######use the below lines for Nagios XI
 # AuthName "Nagios Monitor XI"
 #  AuthType Basic
 # AuthUserFile /usr/local/nagiosxi/etc/htpasswd.users


######Use the below lines for a SOURCE install of Nagios Core
   AuthName "Nagios Access"
   AuthType Basic
   AuthUserFile /usr/local/nagios/etc/htpasswd.users


   Require valid-user
</Directory>
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: Nagiosmobile passwords

Post by BanditBBS »

Code: Select all

#modify this file to fit your apache configuration

Alias /nagiosmobile "/usr/local/nagiosmobile"

<Directory "/usr/local/nagiosmobile">
#  SSLRequireSSL
   Options None
   AllowOverride None
   Order allow,deny
   Allow from all

#  Allow from 127.0.0.1

######use the below lines for Nagios XI
   AuthName "Nagios Monitor XI"
   AuthType Basic
   AuthUserFile /usr/local/nagiosxi/etc/htpasswd.users


######Use the below lines for a SOURCE install of Nagios Core
#  AuthName "Nagios Access"
#  AuthType Basic
#  AuthUserFile /usr/local/nagios/etc/htpasswd.users


   Require valid-user
</Directory>
Mine looks about the same, but different section remarked out. So the question is, how is that htpasswd file being updated and can I get it to use the passwords people auth with to XI
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
User avatar
eloyd
Cool Title Here
Posts: 2190
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: Nagiosmobile passwords

Post by eloyd »

That file was updated ~23 hours ago on our test XI system. I assume that there's some thing in XI that populates the file when "apply changes" are made.
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Nagiosmobile passwords

Post by lmiltchev »

All of the users in "htpasswd.users" should be able to log in nagiosmobile via basic auth.

Code: Select all

awk -F ':' '{print $1}' /usr/local/nagiosxi/etc/htpasswd.users
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: Nagiosmobile passwords

Post by BanditBBS »

lmiltchev wrote:All of the users in "htpasswd.users" should be able to log in nagiosmobile via basic auth.

Code: Select all

awk -F ':' '{print $1}' /usr/local/nagiosxi/etc/htpasswd.users
So what password would that use? What happens for users we import from AD?
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Nagiosmobile passwords

Post by ssax »

The htpasswd file is updated with whatever password is used to login EVERY time the user logs in. When you initially import or create the user the htpasswd entry is only put into the htpasswd file on the first login and then will be updated on every successful login thereafter.

So it should use the AD password as long as they logged into the XI interface with that AD password before.
User avatar
eloyd
Cool Title Here
Posts: 2190
Joined: Thu Sep 27, 2012 9:14 am
Location: Rochester, NY
Contact:

Re: Nagiosmobile passwords

Post by eloyd »

Aw, sweet! That actually helps me with a customer issue! :-)
Image
Eric Loyd • http://everwatch.global • 844.240.EVER • @EricLoyd
I'm a Nagios Fanatic! • Join our public Nagios Discord Server!
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Nagiosmobile passwords

Post by lmiltchev »

BanditBBS, can we lock this topic?
Be sure to check out our Knowledgebase for helpful articles and solutions!
User avatar
BanditBBS
Posts: 2474
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: Nagiosmobile passwords

Post by BanditBBS »

Ludmil, so shouldn't the file have a date/time equal to the last time someone logged into XI?

Code: Select all

-rw-r--r-- 1 nagios apache 4970 Aug 15  2015 /usr/local/nagiosxi/etc/htpasswd.users
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
Locked