Change/Recover VOV DB Passwords in Single-User Backend Mode

AlanB_21407
AlanB_21407 New Altair Community Member
edited February 2023 in Altair HPCWorks

In this article you will learn how to reset single-user database passwords and restore access to the existing database.

The VOV Postgres database is used with Monitor and Accelerator, and uses three roles (user accounts) in normal operation:

  • rtdausr -- read-only queries
  • rtdamgr -- read-write queries that modify the 'rtda' database
  • rtdasu -- to establish the schema and grant privileges

The passwords for these roles are saved in properties on object 1 in the vovserver.  These are established as random 16-character strings when the database is first initialized.

A new set of passwords will be generated when you use the 'Edit Location' button of the Admin->Database page.  This initializes a new, empty database, and causes the passwords saved in vovserver to differ from the ones in the database, so the existing database becomes inaccessible.


+ get shell as LM owner on DB host, with Altair cmds in PATH

% vovproject enable db-project

% vovdb_util showcfg
    (make note of data directory path; if you initialized a new DB, you may have to look up the path the previous location)

  % vovdb_util stopdb -v
    (stop the database from running)

  % ps -aef | grep postgres
    (Important: verify that postgres is stopped)  

  % vovprop list 1 | grep SQL_PW
    Save the output in a file for reference

  % ves +PG  (add RTDA postgres cmds to PATH)

  % postgres --single -D path-from-above rtda
    ('rtda' is the name of the database, starts db single-user mode)

  backend> alter role rtdasu with password 'pw-from-above'
    (repeat for 'rtdausr' and 'rtdamgr' roles, careful to match role/pwd)

  backend> ^D (or your EOF char, if different)

   % vovslavemgr show
    (make sure vovdbd vovslave is running, start it if not)

  % vovdaemonmgr show
    (make sure vovdbd *daemon* is running, start it if not)

  % vovdb_util startdb -v
    (database should start normally)