Change the Postgres Database Password on LicenseMonitor and NetworkComputer (Admin Only)

There are times when the database password is not properly saved on one of the three database roles. When this happens, LicenseMonitor (LM) and NetworkComputer (NC) cannot connect to the database. These instructions explain how to change the password so that NC and LM can connect to the database again.

To make changes to the postgres password, perform the following steps:

1. The database, by default, contains three  main roles, each with their own, preset password.
To find these roles and passwords, run the following commands:

% source /path/to/rtda/installation/common/etc/vovrc.sh (or vovrc.csh depending on shell)
% vovproject enable <project_name>
% vovprop show 1 | grep SQL

 

The output should look similar to this:

SQL_PW_rtdausr = '31UK,CAvlgaXPYXH'
SQL_PW_rtdamgr = 'k,.x5739Q4k<f,nC'
SQL_PW_rtdasu = ‘yZXQ4f5Fltq587gg'

 

2. Before changing anything, you’ll need to save the existing passwords by saving the current properties to the following file:

% source /path/to/rtda/installation/common/etc/vovrc.sh (or vovrc.csh depending on shell)

For customers, use the following command:

% path/to/installation/win64/bat/vovinit.bat
% vovproject enable licmon
% vovprop show 1 | grep SQL > /tmp/SQL_pw.txt

 

Please note: From this point forward, all commands in this instruction set, assume that the shell is already running from the previous commands.

3. Once the passwords have been saved, turn off the database with the following command:

% vovdb_util stopdb
 

4. To change the password for the rtdamgr user, for example, change the value of the property (old password) to the updated value (new password), then update the postgres with the new password.
 
5. Rename the old property and run the following command:

% vovprop set -text 1 “SQL_PW_rtdamgr” “&NeWpAsSwOrD!&”
 

6. Confirm this by running the vovprop show command.

% vovprop show 1 | grep SQL
 

The output should now look like this:

SQL_PW_rtdamgr = ‘&NeWpAsSwOrD!&' 
 

7. Change the password for the database with the following command:

% vovsql_query -x -dbuser rtdasu -dbpassword <grab_from_previous_output> “ALTER user rtdamgr WITH password ‘value-of—new-property’” 
 

8. Start the database back up with the following command: 

% vovdb_util startdb
 

9. Confirm that the database has been started by logging into the browser and going to http://HOST:PORT/admin.

  • For LicenseMonitor, go to the Admin tab, and select System > Database Information. This will show the status of the database.

  • For NetworkComputer, on the left hand side, click on Database
10. If all looks well, you're done.

Did you find this article helpful?