Page 1 of 2
Logged in as ?
Posted: Thu Oct 23, 2014 8:08 am
by moetteli
Hello,
Nagios seems to work flawlessly, but since some time, I always have "Logged in as ?" in the upper left corner.
I don't remember, what I changed, when this behavior started to show.
I googled all over the net and the common solution seems to be to add a .htaccess into the cgi-bin directory:
Code: Select all
/usr/lib/cgi-bin/nagios3# cat .htaccess
<Directory "/usr/lib/cgi-bin/nagios3">
AuthName "Nagios Access"
AuthType Basic
AuthUserFile /etc/nagios3/htpasswd.users
require valid-user
</Directory>
Unfortunately, this doesn't change anything. Probably because there was already a directoryMatch for this directory with the same values in it. And now, I don't have any idea, what I could try.
How could I debug the problem?
Btw, the most important CGI values:
Code: Select all
#default_user_name=guest
authorized_for_system_information=nagiosadmin
authorized_for_configuration_information=nagiosadmin
authorized_for_system_commands=nagiosadmin
authorized_for_all_services=nagiosadmin
authorized_for_all_hosts=nagiosadmin
authorized_for_all_service_commands=nagiosadmin
authorized_for_all_host_commands=nagiosadmin
authorized_for_read_only=test
use_authentication=0
use_ssl_authentication=1
Yes, I connect over HTTPS (443). But even over HTTP (80), it doesn't work.
Thanks for any help
Re: Logged in as ?
Posted: Thu Oct 23, 2014 10:50 am
by abrist
Are you logging in as "nagiosadmin"?
Just to be sure, clear the browser cache and re-login. Do you still see the issue?
If so, what are the permissions on the cgis?
Re: Logged in as ?
Posted: Tue Oct 28, 2014 9:43 am
by moetteli
Hello,
Are you logging in as "nagiosadmin"?
Yes.
Just to be sure, clear the browser cache and re-login.
I haven't saved login credits. I quit Firefox and log in again. Usually, I switch between my user and a user 'test'.
Do you still see the issue?
Yes.
If so, what are the permissions on the cgis?
Code: Select all
# ls -alg /usr/lib/cgi-bin/nagios3/*
-rwxr-xr-x 1 root 288856 Jan 9 2014 /usr/lib/cgi-bin/nagios3/avail.cgi
-rwxr-xr-x 1 root 287416 Jan 9 2014 /usr/lib/cgi-bin/nagios3/cmd.cgi
-rwxr-xr-x 1 root 256000 Jan 9 2014 /usr/lib/cgi-bin/nagios3/config.cgi
-rwxr-xr-x 1 root 301104 Jan 9 2014 /usr/lib/cgi-bin/nagios3/extinfo.cgi
-rwxr-xr-x 1 root 251992 Jan 9 2014 /usr/lib/cgi-bin/nagios3/histogram.cgi
-rwxr-xr-x 1 root 227376 Jan 9 2014 /usr/lib/cgi-bin/nagios3/history.cgi
-rwxr-xr-x 1 root 227376 Jan 9 2014 /usr/lib/cgi-bin/nagios3/notifications.cgi
-rwxr-xr-x 1 root 223240 Jan 9 2014 /usr/lib/cgi-bin/nagios3/outages.cgi
-rwxr-xr-x 1 root 223248 Jan 9 2014 /usr/lib/cgi-bin/nagios3/showlog.cgi
-rwxr-xr-x 1 root 301112 Jan 9 2014 /usr/lib/cgi-bin/nagios3/status.cgi
-rwxr-xr-x 1 root 247872 Jan 9 2014 /usr/lib/cgi-bin/nagios3/statusmap.cgi
-rwxr-xr-x 1 root 243760 Jan 9 2014 /usr/lib/cgi-bin/nagios3/statuswml.cgi
-rwxr-xr-x 1 root 227376 Jan 9 2014 /usr/lib/cgi-bin/nagios3/statuswrl.cgi
-rwxr-xr-x 1 root 247904 Jan 9 2014 /usr/lib/cgi-bin/nagios3/summary.cgi
-rwxr-xr-x 1 root 239704 Jan 9 2014 /usr/lib/cgi-bin/nagios3/tac.cgi
-rwxr-xr-x 1 root 256096 Jan 9 2014 /usr/lib/cgi-bin/nagios3/trends.cgi
Thanks
Re: Logged in as ?
Posted: Tue Oct 28, 2014 2:31 pm
by lmiltchev
Do you see any clues in the logs ("/var/log/syslog" and "/var/log/apache2/error.log")?
Is "nagiosadmin" present in the "/etc/nagios3/htpasswd.users"?
Code: Select all
grep nagiosadmin /etc/nagios3/htpasswd.users
Is selinux enabled?
Run the following command and show us the output:
Re: Logged in as ?
Posted: Wed Oct 29, 2014 10:28 am
by moetteli
Do you see any clues in the logs ("/var/log/syslog" and "/var/log/apache2/error.log")?
Nothing: Not one line is added, when I log in.
Is "nagiosadmin" present in the "/etc/nagios3/htpasswd.users"?
Code: Select all
# grep nagiosadmin /etc/nagios3/htpasswd.users
nagiosadmin:$apr1$C2B[…]U2oW1tua1
Is selinux enabled?
Code: Select all
# sestatus
SELinux status: disabled
Run the following command and show us the output:
Code: Select all
# grep nag /etc/group
nagios:x:120:nagios,www-data,root,shinken
Re: Logged in as ?
Posted: Wed Oct 29, 2014 4:52 pm
by lmiltchev
I don't see an entry for "nagcmd"... Normally, you would have:
Code: Select all
nagios:x:xxx:nagios,www-data
nagcmd:x:xxx:nagios,www-data
Just want to point out that this is a nagios support forum... (shinken is not supported).
Re: Logged in as ?
Posted: Thu Oct 30, 2014 4:19 am
by moetteli
Just want to point out that this is a nags support forum... (shinken is not supported).
I don't have Shinken and I don't intend to use it. I just installed the Nagios Ubuntu packages. I don't know, who created this user.
I will try to find out now about this 'nagcmd'…
Re: Logged in as ?
Posted: Thu Oct 30, 2014 5:26 am
by moetteli
moetteli wrote:I will try to find out now about this 'nagcmd'…
Could somebody do a
and tell me what directories are filled with files owned by that group? Or tell me otherwise, what files and directories I have to change to that group?
Or what else, I could do?
Thanks
Re: Logged in as ?
Posted: Thu Oct 30, 2014 7:44 pm
by Box293
Here's the output of that command:
Code: Select all
/usr/local/nagios/var/spool/checkresults
/usr/local/nagios/var/rw
/usr/local/nagios/var/rw/nagios.cmd
/usr/local/nagios/var/rw/nagios.qh
(this was from an XI server)
Re: Logged in as ?
Posted: Fri Oct 31, 2014 3:44 am
by moetteli
I created the group:
I have changed the files, which were mentioned by one friendly fore-poster:
Code: Select all
# find /usr /var /etc -group nagcmd
/var/lib/nagios3/spool
/var/lib/nagios3/spool/checkresults
/var/lib/nagios3/spool/checkresults/checkKVlPhZ
/var/lib/nagios3/rw
/var/lib/nagios3/rw/nagios.cmd
/var/lib/nagios3/rw/live
Unfortunately, nothing has changed. I'm still anonymous "?".
Please, does anybody have any other idea?
Thanks