
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How to reset forgotten PostgreSQL password in Qlik Sense Enterprise on Windows
A password is provided during the installation of Qlik Sense Enterprise on Windows. Should you forget this password, there's no way to retrieve it; however, it is possible to reset the password by following the steps below.
If after the procedure is completed errors are logged of a wrong password, see Qliksenserepository password error in the event logs after changing the database service user passwo... for further information.
- Stop all the Qlik Sense services
Verify that the Qlik Sense Repository Database service (or postgresql-x64-xx if the database is not a bundled install and/or was installed using QPI) is stopped. - The next step will require modifying the pg_hba.conf and postgresql.conf files. We will swap the currently active authentication method to trust, allowing us to connect without a password.
Before modifying the file, take a backup of both files.
File locations:
Default (bundled):
C:\ProgramData\Qlik\Sense\Repository\PostgreSQL\12.5
Alternative (unbundled, custom install):
C:\Program Files\PostgreSQL\12.5\data
*12.5 refers to the PostgreSQL version. Adjust accordingly depending on what version is installed. - Open a text editor (such as Notepad or Notepad++) As Administrator and browse to the .conf file location.
If you cannot see the .conf files, switch the file view to All Files (*) or All Types, depending on your editor. - Open pg_hba.conf
- Change the METHOD from md5 (alternative: scram-sha-256) to trust
Only the first two lines for IPv4 and IPv6 entries must be changed. trust must be lowercase.
Original:# TYPE DATABASE USER ADDRESS METHOD # IPv4 local connections: host all all 127.0.0.1/32 md5 # IPv6 local connections: host all all ::1/128 md5
Updated:# TYPE DATABASE USER ADDRESS METHOD # IPv4 local connections: host all all 127.0.0.1/32 trust # IPv6 local connections: host all all ::1/128 trust
- Save the file, close it
- Start the Qlik Sense Repository Database (or postgresql-x64-xx).
- Launch the Windows Command Line As Administrator.
- In the command line, navigate to the PostgreSQL bin folder
*12.5 refers to the PostgreSQL version. Adjust accordingly depending on what version is installed.cd "C:\Program files\Qlik\Sense\Repository\PostgreSQL\12.5\bin"
- Run psql to connect to the database:
The response will provide the postgres=# prompt, which we will use to change the passwords.psql -h 127.0.0.1 -p 4432 -U postgres
- Proceed from the postgres=#
The Qlik Sense PostgreSQL database has two users:
postgre: the super user
qliksenserepository: the service user; if the database was installed manually or set up with QPI, this may be the only user set up
The passwords must be the same for both.
- Change the postgres user account (you must include the single quotes and the semicolon):
alter user postgres with encrypted password 'EnterYourNewPasswordHere';
Response:
- Change the qliksenserepository user account (you must include the single quotes and the semicolon):
Response:alter user qliksenserepository with encrypted password 'EnterYourNewPasswordHere';
- Change the postgres user account (you must include the single quotes and the semicolon):
- Close the command prompt.
- Adjust the connection string using QlikSenseUtil
- Open QlikSenseUtil (C:\Program Files\Qlik\Sense\Repository\Util\QlikSenseUtil)
- Open the Connection String Editor tab
- Click Read
- Adjust the password
- Click Save Value in config file encrypted
- Open QlikSenseUtil (C:\Program Files\Qlik\Sense\Repository\Util\QlikSenseUtil)
- Change the Connection Strings for Micro-Services as per Changing the Connection String for Micro-Services.
- Stop the Qlik Sense Repository Database (or postgresql-x64-xx).
- Revert the changes done to the pg_hba.conf file, changing back METHOD from trust to md5 (alternative: scram-sha-256).
- Start all services (Manual start and stop order of Qlik Sense services).
This concludes the required steps.
To verify if the password was correctly changed, you can either run psql again, connect with the PGAdmin, or review the Qlik Sense Repository log for success messages on boot.
If after the procedure is completed errors are logged of a wrong password, see Qliksenserepository password error in the event logs after changing the database service user passwo... for further information.

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hello,
This procedure did not succeed for us (QS Aprilm 2020 Patch 3 ). We had to execute this fix : https://support.qlik.com/articles/Basic/Qliksenserepository-password-error-in-the-event-logs-after-c...
Can you add these steps to the procedure ?
Thank you for your work,

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Has anyone else come across any issues?
I managed to implement all the steps but am unable to access the QMC or Hub.

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hello @hmjason7 - You may want to gather additional information on the issue you are seeing (error messages, screenprints) and post on our Qlik Sense Deployment forums for better visibility.

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
You start the video saying there is no way to recover the password, and then, in step 12, you show us how we can see the old password 🙂
Much easier to recover, than to change it

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
@cata_pli exactly!! 😂

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
@cata_pli , this Step 12 will show you the qliksenserepository password only.
So if you don't remember super admin password (Postgres user) then it won't be enough. It works only if you have put the same password for qliksenserepository and Postgres.

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hi,
i am not able to see bin folder in below location. has any one come across this issue?
cd "C:\Program files\Qlik\Sense\Repository\PostgreSQL\9.6\bin"

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hi @gkkandukuri,
What is your Postgres version ?
Do you have a bundled Postgres Database or a Standalone ?

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
HI,
sorry i found the bin folder was looking in C drive instead of D drive

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
@Bjorn_Wedbratt @Sonja_Bauernfeind
Please combine and/or update this support article with info from https://community.qlik.com/t5/Official-Support-Articles/How-to-change-the-Qlik-Sense-Enterprise-on-W...
3. Changing the Connection String for Micro-Services
Without changing the microservices you cannot complete the password change