Cannot access to Web interface - Ubuntu

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
onedata
Posts: 3
Joined: Tue Apr 08, 2014 8:13 am

Cannot access to Web interface - Ubuntu

Post by onedata »

Hi all,

I have installed Nagios core 4.0 - last stable version. When I want to login on the

Code: Select all

http://localhost/nagios
Apache ask me for credentials, I tried lodin and always I got - 401 Authorization required. The credentials are correct, regarging

Code: Select all

/usr/local/nagios/etc/htpasswd.users
Here some outputs:

Code: Select all

root@onedata-desktop:/usr/local/nagios/sbin# sestatus
SELinux status:                 disabled
root@onedata-desktop:/usr/local/nagios/sbin# service nagios status 
nagios (pid 3309) is running...
Are you think that issue can be with SELinux status? How can I fixed this?

Thank you
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Cannot access to Web interface - Ubuntu

Post by slansing »

I hope you are not trying to log in with the obfuscated password... The defaults should be:

U: nagiosadmin

P: nagiosadmin

To change this run the following:

Code: Select all

sudo htpasswd /etc/nagios4/htpasswd.users nagiosadmin
onedata
Posts: 3
Joined: Tue Apr 08, 2014 8:13 am

Re: Cannot access to Web interface - Ubuntu

Post by onedata »

no, unfortunetly..I tried to change it several times and it wasn't helpful, but now I found that I have the file htpasswd.users in this directory:

Code: Select all

/usr/local/nagios/sbin
it means somthing?
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Cannot access to Web interface - Ubuntu

Post by slansing »

You mentioned:

Code: Select all

/usr/local/nagios/etc/htpasswd.users
Being the path above, is that not actually the path? If it is not in that directory how did you verify it there? Perhaps you should install 'mlocate' and check.

Code: Select all

locate htpasswd.users
I believe mlocate is in the aptitude repo's:

Code: Select all

apt-get install mlocate

updatedb
run:

Code: Select all

locate htpasswd.users
onedata
Posts: 3
Joined: Tue Apr 08, 2014 8:13 am

Re: Cannot access to Web interface - Ubuntu

Post by onedata »

This is the output of the command you adviced us.

Code: Select all

onedata@onedata-desktop:~$ locate htpasswd.users
/usr/local/nagios/etc/htpasswd.users


sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: Cannot access to Web interface - Ubuntu

Post by sreinhardt »

If that is the actual path you need, can be verified by looking at the nagios.conf in your apache conf.d directory (/etc/apache2/conf.d in ubuntu\debian land), you likely built from source, is that true or did you use a package manager version?
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Locked