Nagios Core Password

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
sappjt
Posts: 59
Joined: Thu Nov 18, 2010 12:52 pm

Nagios Core Password

Post by sappjt »

I tried to log into the nagios core, but I am getting denied. What is the default password or where is it located? Or, Can I change the username and password without knowing the original?
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Nagios Core Password

Post by mguthrie »

Nagios core uses Apache's basic authentication. The user information for nagios core is typically stored in a file called htpasswd.users by default. You can use the htpasswd command to add users to this file. There probably isn't a user or password definition in that file on a fresh install. Try the command:

htpasswd /<pathto>/htpasswd.users nagiosadmin

If that file doesn't exist yet, do:

htpasswd -c /<pathto>/htpasswd.users nagiosadmin

It should prompt you to enter a new password for that user and it will write it to file. Make sure your nagios.conf file in your Apache config is also pointing to this file for authentication.
sappjt
Posts: 59
Joined: Thu Nov 18, 2010 12:52 pm

Re: Nagios Core Password

Post by sappjt »

I tried changing the password the way that you suggested and I still can't get logged in. I made sure I was on the correct file, because it only had one username in it and the other had multiple users in it that I created through the nagiosxi add new users. Any other suggestions?
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Nagios Core Password

Post by mguthrie »

If you're accessing Core underneath a nagiosxi install, the htpassd.users file that you need to be working with will be at /usr/local/nagiosxi/etc/htpasswd.users

You can verify where exactly Apache is looking for the authentication by looking at the nagios.conf file.
sappjt
Posts: 59
Joined: Thu Nov 18, 2010 12:52 pm

Re: Nagios Core Password

Post by sappjt »

I changed the password that is associated with /usr/local/nagiosxi/etc/htpasswd.users. I also verified that nagios.conf file was using this file. I tried again, but got denied.
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: Nagios Core Password

Post by mguthrie »

The default password for Nagios Core on an XI installation is the XI 'nagiosadmin' username and password. I don't think the other uses are added to core by default, you have to use the htpasswd command.
Locked