Access Nagios Core without authentication

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Dipu
Posts: 6
Joined: Tue Dec 10, 2013 4:43 am

Access Nagios Core without authentication

Post by Dipu »

Hi,

I want to access Nagios Core web interface without providing user name and password. This option should not allow the logged in user to edit any config file, but he should be able to view the services, hosts and host groups. Only authenticated users should be allowed to edit any config. Could you please elaborate on the procedure to achieve this.

Thanks,
Dipu
User avatar
lmiltchev
Former Nagios Staff
Posts: 13587
Joined: Mon May 23, 2011 12:15 pm

Re: Access Nagios Core without authentication

Post by lmiltchev »

Turning off all security is never a good idea! We don't recommend that you do this, but since you asked - here you go:

To turn off all authentication:

Change the following line in the "/usr/local/nagios/etc/cgi.cfg" from:

Code: Select all

use_authentication=1
to

Code: Select all

use_authentication=0
Modify the "/etc/httpd/conf.d/nagios.conf" file, so it is going to look like this:

Code: Select all

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 Access"
#  AuthType Basic
#  AuthUserFile /usr/local/nagios/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 Access"
#  AuthType Basic
#  AuthUserFile /usr/local/nagios/etc/htpasswd.users
#  Require valid-user
</Directory>
Restart apache and nagios:

Code: Select all

service httpd restart
service nagios restart
To set up read-only users:

In the cgi.cfg file, set up a "read-only" user (e.i. john):

Code: Select all

authorized_for_all_services=nagiosadmin,john
authorized_for_all_hosts=nagiosadmin,john
authorized_for_read_only=john
To set up a user with a full access to hosts/services (like the nagiosadmin)

Code: Select all

authorized_for_system_information=nagiosadmin,john
authorized_for_configuration_information=nagiosadm,john
authorized_for_system_commands=nagiosadmin,john
authorized_for_all_services=nagiosadmin,john
authorized_for_all_hosts=nagiosadmin,john
authorized_for_all_service_commands=nagiosadmin,john
authorized_for_all_host_commands=nagiosadmin,john
Restart apache and nagios:

Code: Select all

service httpd restart
service nagios restart
Be sure to check out our Knowledgebase for helpful articles and solutions!
ozeryumsek
Posts: 1
Joined: Mon Nov 17, 2014 9:52 am

Re: Access Nagios Core without authentication

Post by ozeryumsek »

Hello

I did the configuration changes but it still asks for username/password.

Im trying to monitor nagios on samsung smart tv. Browser on the smart tv doesnt show password screen so I need to disable security and authentication parameters.

Please help about this issue.

Thanks

Regards.
User avatar
lmiltchev
Former Nagios Staff
Posts: 13587
Joined: Mon May 23, 2011 12:15 pm

Re: Access Nagios Core without authentication

Post by lmiltchev »

Having unsecured nagios server out in the open is a horrible idea. The described mods in my previous post should work. You would need to forward a port and use the external IP to access the nagios server on your Samsung smart TV.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked