Create the username, password for logging into the Nagios interface.
# htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin
# ls -l /usr/local/nagios/etc/htpasswd.users
My hunch it that you should be able to overwrite the existing file with this – or you could look at it first, but I’m pretty sure it’ll not contain any clear text passwords (only hashes)… If the file’s not where it’s supposed to be, try whereis nagios or which nagios.
The recipe continues like this:
Make it available for the user who runs httpd.
# chmod o+r /usr/local/nagios/etc/htpasswd.users
Restart the httpd service.
# service httpd restart
I strongly advise you handle this suggestion with extreme care! I explicitly refuse any kind of responsibility! I’m no expert. I’d use this as a last resort; please be aware that you can cripple your Nagios installation this way (if the password file gets botched instead of overwritten, Nagios might refuse to run). It may be a good idea to talk to the Nagios people directly.