How to disable Nagios Core GUI authentication
How to disable Nagios Core GUI authentication
We have a Nagios Core v4.2.1 installed on a Ubuntu 16.04 server. We want to disable the Apache authentication when accessing this Nagios Core GUI. What needs to be changed to disable the Apache authentication? Thanks!
-
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: How to disable Nagios Core GUI authentication
Hi @xlin125,
This is really not something we would reccomend doing due security issues. That said, here's how I was able to get it working.
Change the following line in the /usr/local/nagios/etc/cgi.cfg from:
See: https://assets.nagios.com/downloads/nag ... igcgi.html .. for documentation on this parameter.
Next, you'll need to comment out the authorization lines in the nagios Apache configuration file found in /etc/httpd/conf.d ( be sure to make a backup of this file before changing anything).
Sample File:
Once you make all the changes, restart httpd and nagios:
Then try to access the Nagios home page.
This is really not something we would reccomend doing due security issues. That said, here's how I was able to get it working.
Change the following line in the /usr/local/nagios/etc/cgi.cfg from:
Code: Select all
use_authentication=1
# to
use_authentication=0
Next, you'll need to comment out the authorization lines in the nagios Apache configuration file found in /etc/httpd/conf.d ( be sure to make a backup of this file before changing anything).
Sample File:
Code: Select all
<Directory "/usr/local/nagios/sbin">
# SSLRequireSSL
Options ExecCGI
AllowOverride None
<IfVersion >= 2.3>
<RequireAll>
Require all granted
# Require host 127.0.0.1
# AuthName "Nagios Access"
# AuthType Basic
# AuthUserFile /usr/local/nagios/etc/htpasswd.users
# Require valid-user
</RequireAll>
</IfVersion>
<IfVersion < 2.3>
Order allow,deny
Allow from all
# Order deny,allow
# Deny from all
# Allow from 127.0.0.1
# AuthName "Nagios Access"
# AuthType Basic
# AuthUserFile /usr/local/nagios/etc/htpasswd.users
# Require valid-user
</IfVersion>
</Directory>
Alias /nagios "/usr/local/nagios/share"
<Directory "/usr/local/nagios/share">
# SSLRequireSSL
Options None
AllowOverride None
<IfVersion >= 2.3>
<RequireAll>
Require all granted
# Require host 127.0.0.1
# AuthName "Nagios Access"
# AuthType Basic
# AuthUserFile /usr/local/nagios/etc/htpasswd.users
# Require valid-user
</RequireAll>
</IfVersion>
<IfVersion < 2.3>
Order allow,deny
Allow from all
# Order deny,allow
# Deny from all
# Allow from 127.0.0.1
# AuthName "Nagios Access"
# AuthType Basic
# AuthUserFile /usr/local/nagios/etc/htpasswd.users
# Require valid-user
</IfVersion>
</Directory>
Code: Select all
service httpd restart
service nagios restart
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: How to disable Nagios Core GUI authentication
@benjaminsmith,
Thanks for the response. I commented out the authentication lines in the Nagios.conf, and restart the Nagios. The authentication is disabled now. However, the Nagios Core Web Interface does not show who is the user, it only shows "Logged in as ?". It seems this unknown user has nagiosadmin privilege. I remember we can set this user to a user defined in the cgi.cfg file (set $USER to a user defined in cgi.cfg). Where is this configuration file? I am searching for it.
Thanks for the response. I commented out the authentication lines in the Nagios.conf, and restart the Nagios. The authentication is disabled now. However, the Nagios Core Web Interface does not show who is the user, it only shows "Logged in as ?". It seems this unknown user has nagiosadmin privilege. I remember we can set this user to a user defined in the cgi.cfg file (set $USER to a user defined in cgi.cfg). Where is this configuration file? I am searching for it.
Re: How to disable Nagios Core GUI authentication
I found it. It can be set in the cgi.cfg file.
-
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: How to disable Nagios Core GUI authentication
Hi @xlin125,
Great. Is ok to close this topic or did you have any other questions?I found it. It can be set in the cgi.cfg file.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!
Re: How to disable Nagios Core GUI authentication
@benjaminsmith, thank you! yes, please close this topic.
-
- Posts: 5324
- Joined: Wed Aug 22, 2018 4:39 pm
- Location: saint paul
Re: How to disable Nagios Core GUI authentication
Sounds good. Closing topic.
Thank you for using the Nagios Support Forum.
Thank you for using the Nagios Support Forum.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Be sure to check out our Knowledgebase for helpful articles and solutions!