Continuous Prompt for Password when accessing http://localho


I have installed Nagios according to the documentation found at localhost/nagios. I have added the users to the nagcmd group and also set up the nagiosadmin authenticated users in the /etc directory.
Upon configuring the nagios file initially, it did not give me a /etc folder, I had to create it myself and then add admin users.

Everytime I try and access the page, I am prompted for the username and password continually.
Please help if you can


Found the solution to the missing file at … desc=false
But am still unable to load the page. I am still being prompted to enter username and password continuously.



see the log file of httpd : /var/log/httpd/error_log
if you see some lines about Mysql error such as :

MySQL user nagiosadmin not found: /nagios/

try to remove mod_auth_mysql package and restart httpd .
you can find more here :


I know you said you’ve set up everything according to the docs, but I just want to make sure. Make sure these things check out:

  1. Have you created the .htaccess files as needed in the /usr/local/nagios/share and /usr/local/nagios/sbin directories?
  2. Have you used the htpasswd command as necessary to create the htpasswd.users file in the /usr/local/nagios/etc directory?
  3. Have you edited cgi.cfg to allow the users in your htpasswd.users file to have the permissions to read and execute as necessary?

I would double-check these more basic items and then proceed to dig deeper if everything checks out.


Last error recieved
[Fri Feb 17 11:43:32 2006] [error] [client] (13)Permission denied: Could not open password file: /usr/local/nagios/etc/htpasswd.users
[Fri Feb 17 11:43:32 2006] [error] [client] user nagios not found: /nagios
[Fri Feb 17 11:45:17 2006] [error] [client] (13)Permission denied: Could not open password file: /usr/local/nagios/etc/htpasswd.users
[Fri Feb 17 11:45:17 2006] [error] [client] user nagiosadmin not found: /nagios

( I am logged on the system as root, do i need to login as nagios user?)

As for the .htaccess files, could you please point me in the right direction in relation to this configuration, i could not find anywhere in the documentation in relating to these files.
I have used the htpasswd command and have not edited the cgi.cfg file. Please ignore the fact these might seem to be quite obvious… I am fairly new to both Linux and Nagios, I appreciate your help greatly.

We are running Red Hat 9



no reference to htpasswd?

and you need to login the webpage as nagiosadmin, you should have set this up in the config files…


PS: the htpasswd.user files needs to be owned by the nagcmd group… and the user running apache should be in that group… otr apache will ever be able to open that file. Which is what seems to be happening to you.
Edited Fri Feb 17 2006, 09:29AM ]


It doesn’t really have to do with your Linux logon. It looks like you’re trying to log into your web interface with the user Nagios. If that user doesn’t exist, follow to the docs to add user Nagios if you want. Note that you would be adding the Nagios user separate from the Linux user (though you must still create the Linux user, nagios).

Confused yet? =p

The page Luca points to should show you how to add Nagios users. However, you will still need to edit cgi.cfg to allow the Nagios users certain permissions. That only applies, though, if you don’t follow the default config. By default, I think the user Luca refers to - nagiosadmin - is authorized to do anything via the web interface.
Edited Fri Feb 17 2006, 07:22PM ]


try to remove mod_auth_mysql package and restart httpd

++ Have tried this, No package installed

  1. Have you created the .htaccess files as needed in the /usr/local/nagios/share and /usr/local/nagios/sbin directories?

++ I do not have a htaccess file in the nagios directory.
What needs to go into this file and where does it live?

Fanx for your replies :frowning:


That is explained in great detail in the documentation.
Pay attention to the section Setting up the web interface, and also the Authentication And Authorization In The CGIs.
Also, note one important error in the 2.0 docs that is documented here: … c.php?6194


Please stop double posting about the same problem. I just got through explaining the solution in 2 threads.


Thanx for the input folks, I recieved the answer I was after from the mailing list. The problem was permission based and these following commands got me out of trouble.
chmod 640 /usr/local/nagios/etc/htpasswd.users
chown nagios:nagcmd /usr/local/nagios/etc/htpasswd.users