Page 1 of 1
Access Nagios Core without authentication
Posted: Tue Apr 22, 2014 7:07 am
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
Re: Access Nagios Core without authentication
Posted: Tue Apr 22, 2014 2:40 pm
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:
to
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
Re: Access Nagios Core without authentication
Posted: Wed Jan 07, 2015 4:44 am
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.
Re: Access Nagios Core without authentication
Posted: Wed Jan 07, 2015 9:25 am
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.