Reset the PostgreSQL admin password on a Jitterbit private agent
Introduction
The private agent installation process sets up the following two PostgreSQL administrator user accounts:
-
postgres: The default admin user. You set the password for this account when you install the private agent. -
jitterbit(Linux) /jitterbitpostgres(Windows): An additional admin user created by the installation process. The password for this account is randomly generated at installation time and written to the[DbInfo]section of thejitterbit.conffile. On Windows,jitterbitpostgresalso serves as the Windows OS service account that runs the PostgreSQL service.
Since both accounts have the same database access rights, you can use the jitterbit or jitterbitpostgres account to reset the postgres account's password if you lose or forget it. On Windows, if you also need to reset the jitterbitpostgres Windows OS service account password (for example, when prompted during a private agent upgrade), see Reset the jitterbitpostgres Windows service account password.
Change the postgres admin user account password
To change the postgres admin user account password, follow these steps:
-
Log into the private agent host.
-
Find the randomly generated PostgreSQL password in the
jitterbit.conffile:Windows PowerShellSelect-String -Path 'C:\Program Files\Jitterbit Agent\jitterbit.conf' -Pattern "^Password"Linux terminalgrep ^Password /opt/jitterbit/jitterbit.conf -
Copy the value of the
Passwordkey (excluding the leading and trailing single quotes). -
In a console, log into the database:
cd "\Program Files\PostgreSQL\*\bin" .\psql --username=jitterbitpostgres --dbname=postgresexport LD_LIBRARY_PATH="/opt/jitterbit/pgsql/lib" /opt/jitterbit/pgsql/bin/psql --username=jitterbit --dbname=postgres --port=6432When prompted, enter the password copied in the previous step.
-
At the
postgres=#prompt, change the password for thepostgresadmin user:ALTER USER postgres WITH PASSWORD '********';Replace
********with a password meeting the PostgreSQL password restrictions and your organization's security policies. -
Exit the
psqlsession:\q -
Restart the private agent.
Reset the jitterbitpostgres Windows service account password
On Windows, jitterbitpostgres exists as both a PostgreSQL database user and a Windows OS service account that runs the PostgreSQL service. The two passwords are independent. If the Windows OS service account password is unknown or has expired, follow these steps to reset it:
-
Log into the private agent host as a Windows administrator.
-
In a command prompt (run as administrator), set a new password:
net user jitterbitpostgres <new_password>Replace
<new_password>with a password meeting the PostgreSQL password restrictions and your organization's security policies. -
Open Windows Services (
services.msc), find the postgresql-x64-* service, and open its Properties. -
On the Log On tab, enter the new password in the Password and Confirm password fields, then click OK.
-
Restart the private agent.
Note
The jitterbitpostgres PostgreSQL database user password is independent of the Windows OS service account password. It is set at installation and is not affected by resetting the Windows OS account password. If you use PgAdmin to connect to the database, continue using the original installation password.