How to install Nagios on CentOS?
Nagios Password File Setup
If you don’t want to use the name “nagiosadmin” simply substitute your name. Remember later on you will need to use the same name in some CGI configuration settings.
[root@yourmachine ~] htpasswd -c /etc/nagios/htpasswd.users nagiosadmin
New password: type_your_password
Re-type new password: re-type_your_password
Adding password for user nagiosadmin
It’s also up to you if you’d like to create a “guest” account. The guest account would allow viewers to see various things you specify within Nagios, but it won’t give them total access to the CGI interface. For example, viewers could see host status information, but can’t schedule downtime for hosts…things like this. If you want a guest account, add the account.
[root@yourmachine ~] htpasswd /etc/nagios/htpasswd.users guest
New password: type_your_password
Re-type new password: re-type_your_password
Adding password for user guest
NOTE: Notice I took away the “-c” option. This is the create option. Since you already created the file, make sure any other accounts you add are not with the create option. You’ll wipe the file out if you do.