Page 1 of 2
Not able to place servers into maintenance mode
Posted: Wed Apr 18, 2018 12:52 pm
by bsivavani
Hi,
We are not able to place servers into maintenance mode.
We have observed that, we are not able to login to below URL with nagiosadmin and it is showing Authorization Required.
https://HOSTNAME/nagios/cgi-bin/cmd.cgi
Kindly advice ?
Re: Not able to place servers into maintenance mode
Posted: Wed Apr 18, 2018 1:01 pm
by scottwilkerson
So this was working in our remote session earlier.
As for logging in are you using the same password you use to login the the Nagios XI interface?
Re: Not able to place servers into maintenance mode
Posted: Wed Apr 18, 2018 1:20 pm
by bsivavani
This login
https://HOSTNAME/nagios/cgi-bin/cmd.cgi we didn't try in remote session.
Yes. I am using the same password.
Re: Not able to place servers into maintenance mode
Posted: Wed Apr 18, 2018 1:26 pm
by scottwilkerson
Lets force reset the password (you can use the same one if you like) from Admin -> Users
Re: Not able to place servers into maintenance mode
Posted: Wed Apr 18, 2018 1:44 pm
by bsivavani
Tried by resetting the password, but still we are seeing the same issue.
We are not able to login with any of local/AD user.
Re: Not able to place servers into maintenance mode
Posted: Wed Apr 18, 2018 2:01 pm
by scottwilkerson
Please post the output of the following:
Re: Not able to place servers into maintenance mode
Posted: Thu Apr 19, 2018 1:51 am
by bsivavani
Please find below output
[root@XXXXX ~]# cat /etc/httpd/conf.d/nagios.conf
# SAMPLE CONFIG SNIPPETS FOR APACHE WEB SERVER
# Last Modified: 11-26-2005
#
# This file contains examples of entries that need
# to be incorporated into your Apache web server
# configuration file. Customize the paths, etc. as
# needed to fit your system.
ScriptAlias /nagios/cgi-bin "/usr/local/nagios/sbin"
<Directory "/usr/local/nagios/sbin">
# SSLRequireSSL
Options ExecCGI
AllowOverride None
Order allow,deny
Allow from all
# Order deny,allow
# Deny from all
# Allow from 127.0.0.1
AuthName "Nagios Core"
AuthType Basic
AuthUserFile /usr/local/nagiosxi/etc/htpasswd.users
Require valid-user
</Directory>
Alias /nagios "/usr/local/nagios/share"
<Directory "/usr/local/nagios/share">
# SSLRequireSSL
Options None
AllowOverride None
Order allow,deny
Allow from all
# Order deny,allow
# Deny from all
# Allow from 127.0.0.1
AuthName "Nagios Core"
AuthType Basic
AuthUserFile /usr/local/nagiosxi/etc/htpasswd.users
Require valid-user
</Directory>
[root@XXXXX ~]#
Re: Not able to place servers into maintenance mode
Posted: Thu Apr 19, 2018 7:59 am
by scottwilkerson
Can you show the output of
Code: Select all
ls -al /usr/local/nagiosxi/etc/htpasswd.users
Also, can you open the file and verify the user you are trying is in there (e.g. nagiosadmin)
Re: Not able to place servers into maintenance mode
Posted: Thu Apr 19, 2018 8:18 am
by bsivavani
Please find below output
[root@XXXXX ~]# ls -al /usr/local/nagiosxi/etc/htpasswd.users
-rw-r--r-- 1 nagios apache 3261 Apr 17 15:02 /usr/local/nagiosxi/etc/htpasswd.users
[root@XXXXX ~]#
I see the file is empty
[root@XXXXX ~]# cat /usr/local/nagiosxi/etc/htpasswd.users
...
PROCESSED 0 COMMANDS
[root@XXXXX ~]#
Re: Not able to place servers into maintenance mode
Posted: Thu Apr 19, 2018 9:12 am
by scottwilkerson
the the file was overwritten Apr 17 15:02
bsivavani wrote:[root@XXXXX ~]# cat /usr/local/nagiosxi/etc/htpasswd.users
...
PROCESSED 0 COMMANDS
And this is not empty, the file literally contains
Which is what the output from one of our cron would be, somehow it got copied into this file...
The only thing I can suggest is again restoring the backup from 4/16/2018 you had again.
Or, you could download that backup tarball and extract the above file and replace the current one from the backup