How to login to the web interface?

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
spfkben
Posts: 4
Joined: Mon Jun 15, 2015 8:41 am

How to login to the web interface?

Post 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
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: How to login to the web interface?

Post by jolson »

Is anything showing up in your apache error log?

Code: Select all

tail /var/log/httpd/error_log
Is SELinux running?

Code: Select all

sestatus
If SELinux is on, you should try turning it off via /etc/sysconfig/selinux - change 'enforcing' to 'disabled' and restart your Fedora box.
Twits Blog
Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
spfkben
Posts: 4
Joined: Mon Jun 15, 2015 8:41 am

Re: How to login to the web interface?

Post 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/
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: How to login to the web interface?

Post by ssax »

Please post the output of this command:

Code: Select all

ls -l /usr/local/nagios/etc/htpasswd.users
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: How to login to the web interface?

Post by ssax »

And post the output of this command:

Code: Select all

cat /etc/httpd/conf.d/nagios.conf
spfkben
Posts: 4
Joined: Mon Jun 15, 2015 8:41 am

Re: How to login to the web interface?

Post 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>
jolson
Attack Rabbit
Posts: 2560
Joined: Thu Feb 12, 2015 12:40 pm

Re: How to login to the web interface?

Post 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!
Twits Blog
Show me a man who lives alone and has a perpetually clean kitchen, and 8 times out of 9 I'll show you a man with detestable spiritual qualities.
spfkben
Posts: 4
Joined: Mon Jun 15, 2015 8:41 am

Re: How to login to the web interface?

Post by spfkben »

Excellent!
That did it.
Thank you very much!
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: How to login to the web interface?

Post by tmcdonald »

Awesome! I'll be closing this thread now, but feel free to open another if you need anything in the future!
Former Nagios employee
Locked