How to reset PostgreSQL database password for SoftActivity software
By default, SoftActivity uses PostgreSQL database user name: softactivity
with the same password as the administrator have set for TS Monitor or Activity Monitor product during installation.
By default, connections to the database only can be made from a local computer where PostgreSQL is installed.
To reset PostgreSQL database password in SoftActivity product, follow these steps:
- Open Database tab in TS Monitor or Activity Monitor settings, click Check Connection to verify connection settings:
- Try the password used to open Activity Monitor or TS Monitor. If it’s still not accepted, you can reset the password for the database.
- Click About tab, click PostgreSQL config files link to open the database’s pgdata folder.
- Back up pg_hba.conf there found there.
- Open pg_hba.conf file in Notepad and add these 2 lines:
host all all 127.0.0.1/32 trust
host all all ::1/32 trust
Warning: this line allows any user to connect to the database from the local computer without password authentication. This line must be removed later
- Restart PostgreSQL server by restarting SapgSrv service in Windows Services or from command line:
sc stop SapgSrv
sc start SapgSrv
Make sure that SapgSrv service has started and is in Running state. If pg_hba.conf file has been incorrectly formatted after editing, the service might not start.
- Open Command Prompt in this folder:
“C:\Program Files (x86)\SoftActivity\Activity Monitor\postgres\bin”
or “C:\Program Files (x86)\SoftActivity TS Monitor\postgres\bin”
- Run from Command line:
psql -h localhost -U softactivity -d postgres
,where softactivity: user name used for connection
postgres – database name
It should not ask for password and will connect you to the database from command line.
- Enter the following command that changes password for user softactivity (replace my_secure_password with an actual unique password):
ALTER USER softactivity with password ‘my_secure_password’;
and press Enter to execute.
Type \q and press Enter to exit psql
- Important: Restore pg_hba.conf to its original state, restart SapgSrv
- Enter your new password on Database tab in Settings and click Check Connection to verify that it’s accepted now.