Page 1 of 1
How to login to the web interface?
Posted: Mon Jun 15, 2015 9:25 am
by spfkben
What is the secret to logging in to the Nagios web interface?
I am new to Nagios, and to Linux as well (a recent convert from AIX).
We are running RHEL 6.5.
I installed and configured Nagios using the Fedora quickstart (
http://nagios.sourceforge.net/docs/3_0/ ... edora.html)
I set the nagiosadmin userid/passwd using htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin
And I accessed the web interface signon screen with
http://pablnx98/nagios/
But every time I enter my userid (nagiosadmin) and password (as set with the htpasswd command, above), it just brings me right back to the same sign on screen.
I've tried changing the password with the htpasswd command, but it doesn't make any difference.
Can you help me?
Thanks.
Jim
Re: How to login to the web interface?
Posted: Mon Jun 15, 2015 10:17 am
by jolson
Is anything showing up in your apache error log?
Is SELinux running?
If SELinux is on, you should try turning it off via /etc/sysconfig/selinux - change 'enforcing' to 'disabled' and restart your Fedora box.
Re: How to login to the web interface?
Posted: Mon Jun 15, 2015 10:37 am
by spfkben
Thank you for the reply.
No, we have selinux disabled:
[root@pablnx98 ~]# sestatus
SELinux status: disabled
And below is the apache log (nothing for today, when I attempted to sign into the Nagios web interface):
[root@pablnx98 ~]# tail /var/log/httpd/error_log
[Sun Jun 14 05:03:41 2015] [error] [client 127.0.0.1] Directory index forbidden
by Options directive: /var/www/html/
[Sun Jun 14 05:08:41 2015] [error] [client 127.0.0.1] Directory index forbidden
by Options directive: /var/www/html/
[Sun Jun 14 05:13:41 2015] [error] [client 127.0.0.1] Directory index forbidden
by Options directive: /var/www/html/
[Sun Jun 14 05:18:41 2015] [error] [client 127.0.0.1] Directory index forbidden
by Options directive: /var/www/html/
[Sun Jun 14 05:23:41 2015] [error] [client 127.0.0.1] Directory index forbidden
by Options directive: /var/www/html/
[Sun Jun 14 05:28:41 2015] [error] [client 127.0.0.1] Directory index forbidden
by Options directive: /var/www/html/
[Sun Jun 14 05:33:41 2015] [error] [client 127.0.0.1] Directory index forbidden
by Options directive: /var/www/html/
[Sun Jun 14 05:38:41 2015] [error] [client 127.0.0.1] Directory index forbidden
by Options directive: /var/www/html/
[Sun Jun 14 05:43:41 2015] [error] [client 127.0.0.1] Directory index forbidden
by Options directive: /var/www/html/
[Sun Jun 14 05:48:41 2015] [error] [client 127.0.0.1] Directory index forbidden
by Options directive: /var/www/html/
Re: How to login to the web interface?
Posted: Mon Jun 15, 2015 10:52 am
by ssax
Please post the output of this command:
Code: Select all
ls -l /usr/local/nagios/etc/htpasswd.users
Re: How to login to the web interface?
Posted: Mon Jun 15, 2015 10:54 am
by ssax
And post the output of this command:
Re: How to login to the web interface?
Posted: Mon Jun 15, 2015 10:57 am
by spfkben
[root@pablnx98 ~]# ls -l /usr/local/nagios/etc/htpasswd.users
-rw-r----- 1 root root 26 Jun 12 14:57 /usr/local/nagios/etc/htpasswd.users
[root@pablnx98 ~]# cat /etc/httpd/conf.d/nagios.conf
# SAMPLE CONFIG SNIPPETS FOR APACHE WEB SERVER
#
# 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 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>
Re: How to login to the web interface?
Posted: Mon Jun 15, 2015 11:15 am
by jolson
[root@pablnx98 ~]# ls -l /usr/local/nagios/etc/htpasswd.users
-rw-r----- 1 root root 26 Jun 12 14:57 /usr/local/nagios/etc/htpasswd.users
It looks like your htpasswd file is restricted to root only at the moment.
Code: Select all
chmod o+r /usr/local/nagios/etc/htpasswd.users
Now try logging in. Nice find ssax!
Re: How to login to the web interface?
Posted: Mon Jun 15, 2015 11:50 am
by spfkben
Excellent!
That did it.
Thank you very much!
Re: How to login to the web interface?
Posted: Mon Jun 15, 2015 11:51 am
by tmcdonald
Awesome! I'll be closing this thread now, but feel free to open another if you need anything in the future!