Note: There will be a short outage to Opsview Monitor while the passwords are changed.
As root, stop all Opsview Monitor daemons:
/opt/opsview/watchdog/bin/opsview-monit stop all
Edit passwords in /usr/local/nagios/etc/opsview.conf
Change passwords in MySQL to match those in opsview.conf
Note: Passwords should avoid characters such as @, ! and $ due to handling by Perl or by the shell. You can see how the variables would be calculated by running /usr/local/nagios/bin/opsview.sh.
$ mysql -u root -p Password: mysql> USE mysql; mysql> UPDATE user SET password=PASSWORD("newpass") WHERE user="opsview"; mysql> UPDATE user SET password=PASSWORD("newpass") WHERE user="odw"; mysql> UPDATE user SET password=PASSWORD("newpass") WHERE user="nagios"; mysql> UPDATE user SET password=PASSWORD("newpass") WHERE user="reports"; mysql> FLUSH PRIVILEGES; mysql> quit
Run /usr/local/nagios/bin/rc.opsview gen_config for 5.X - this will regenerate the Opsview Monitor configuration files and then restart the Opsview Monitor daemons automatically.
As root, validate that all of the Opsview Monitor daemons are running correctly:
How do I change the "admin" User Interface password?
To change the "admin" user password (if the current one is known) via the Opsview Monitor Web Interface follow the steps noted below:
Login as the admin user
Click on the name in the top right, then choose My Profile
Enter the new password in the fields provided, and click Submit Changes
Note: Your current UI session will continue, but you will need to use the new password for the next login.
How do I recover the "admin" Web User Interface password?
In the event that the "admin" password has been lost, the following commands will reset it to the installation default.
mysql -u root -p Password: mysql> use opsview; mysql> update contacts set encrypted_password='$apr1$SUR3Kcd8$CkJfpqvqy3r.6rzawNwCS.' where name='admin';
You should now be able to access the Opsview Monitor Web User Interface once again using the username "admin" and the password "initial".
Note: Be sure to change the password to something other than the default!