[ This Blog Was Moved To : http://www.diknows.com ]
Later this afternoon, a colleague asked my help to change the Nagios Password.
So, lets cut to the chase, here are the steps I used:
root# touch /usr/local/nagios/sbin/.htaccess root# vi /usr/local/nagios/share/.htaccess
And I wrote the follwing text in the .htaccess file
AuthName "Nagios Access" AuthType Basic AuthUserFile /usr/local/nagios/etc/htpasswd.users require valid-user
Then, I did the following:
root# touch /usr/local/nagios/share/.htaccess root# vi /usr/local/nagios/sbin/.htaccess
And I wrote the same text in that file too. Then, I did the following
(Which is the command for changing the password ):root# htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin New password: Re-type new password: Adding password for user nagiosadmin root# ls -l /usr/local/nagios/etc/htpasswd.users -rwxrwxr-- 1 nagios nagios 26 Dec 21 15:54 /usr/local/nagios/etc/htpasswd.usersroot# root# chmod o+r /usr/local/nagios/etc/htpasswd.users root# service httpd restart Stopping httpd: [ OK ] Starting httpd: [ OK ]
And, This is it for now.