How can I change the password of a user account for the back-end database?

How can I change the password of a user account for the back-end database?

Steps to change the password of a “Postgres” user account:

  • Shut down Applications Manager.
  • Open the Command Prompt as Administrator and go to the Applications Manager installation directory ($AppManager_Home/working)
  • Run startPGSQL.sh/startPGSQL.bat to start the PostgreSQL database.

Example

Windows Command:

AppManagerHome\working\bin>startPGSQL.bat

Linux Command:

AppManagerHome/working$./bin/startPGSQL.sh

  • Once the server has started, go to the PostgreSQL directory and execute the following command to connect with postgres database: (Get the postgresql database running port from AMServer.properties file in AppManager_Home/conf directory. Key is am.db.port)

Windows Command:

AppManagerHome\working\pgsql\bin>psql -p 15432 -U postgres -h localhost -d postgres

Linux Command:

AppManagerHome/working/pgsql/bin$./psql -p 15432 -U postgres -h localhost -d postgres

  • Once connected with database, execute the following query:

postgres=# ALTER USER postgres WITH PASSWORD ‘DBNewPwd’;

postgres=# \q

  • Go to the directory where Applications Manager is installed and open “database_params.conf” file under directory $AppManager_Home/working/conf.
  • Edit the following line and replace the existing password with new one:

    Existing Line :

    # login password for the database if any

    encryptedpassword eK6q1CJ9697s7O AppModules TopoDB-MapDB-EventDB-AlertDB-PollDB-PolicyDB-USERSTORAGEDB-ApplnDB

    Line with the new password :

    # login password for the database if any

    password DBNewPwd AppModules TopoDB-MapDB-EventDB-AlertDB-PollDB-PolicyDB-USERSTORAGEDB-ApplnDB

  • Shut down Applications Manager again to terminate the existing database connection and restart it. 

                  New to ADSelfService Plus?