Page 1 of 1

New Core Install

Posted: Tue Nov 26, 2013 11:52 am
by costanza2k1
Hi all, I've just installed Core on a dev virtual machine and am unable to log into the site with the 'nagiosadmin' username I created. I followed the procedures and did this:

Create a Default User for Web Access.
Add a default user for Web Interface Access:
htpasswd –c /usr/local/nagios/etc/htpasswd.users nagiosadmin

Went back in and checked to see if the account exists and it does. The website comes up but I'm still unable to get into with the password I created. Can you point me in the right direction please, hate to bother you guys with something that should be easy.

Code: Select all

sudo /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

Nagios Core 4.0.1
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 10-15-2013
License: GPL

Website: http://www.nagios.org
Reading configuration data...
   Read main config file okay...
   Read object config files okay...

Running pre-flight check on configuration data...

Checking objects...
        Checked 8 services.
        Checked 1 hosts.
        Checked 1 host groups.
        Checked 0 service groups.
        Checked 1 contacts.
        Checked 1 contact groups.
        Checked 24 commands.
        Checked 5 time periods.
        Checked 0 host escalations.
        Checked 0 service escalations.
Checking for circular paths...
        Checked 1 hosts
        Checked 0 service dependencies
        Checked 0 host dependencies
        Checked 5 timeperiods
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...

Total Warnings: 0
Total Errors:   0

Things look okay - No serious problems were detected during the pre-flight check

Re: New Core Install

Posted: Tue Nov 26, 2013 12:53 pm
by lmiltchev
What is the error that you get when you try to log in? Is apache service running? Did you try to stop iptables and/or SELinux?

Re: New Core Install

Posted: Tue Nov 26, 2013 1:04 pm
by costanza2k1
When going to my nagios site, it's asking me to authenticate. I put in the username 'nagiosadmin' and my password and it won't take. I've restarted apache, httpd, and turned off iptables. Any suggestions?

Re: New Core Install

Posted: Tue Nov 26, 2013 1:24 pm
by slansing
There should be no issues with changing the password via:

Code: Select all

htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin
Can you re-run this and test with a very simple alpha numeric password?

Re: New Core Install

Posted: Tue Nov 26, 2013 1:24 pm
by lmiltchev
Do you get any errors in the apache error log, when you try to log in? You can start a running tail on the log, try to log in the web interface, and check the tail's output for errors.

In RHEL/Centos:

Code: Select all

tail -f /var/log/httpd/error_log
In Ubuntu/Debian:

Code: Select all

tail -f /var/log/apache2/error.log
You can try resetting the password by re-running:

Code: Select all

htpasswd –c /usr/local/nagios/etc/htpasswd.users nagiosadmin
and selecting a simple password for test purposes (no special characters).

Re: New Core Install

Posted: Tue Nov 26, 2013 1:29 pm
by costanza2k1
slansing wrote:There should be no issues with changing the password via:

Code: Select all

htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin
Can you re-run this and test with a very simple alpha numeric password?
Boom! That worked! Thanks a ton

Re: New Core Install

Posted: Tue Nov 26, 2013 1:41 pm
by slansing
Awesome!