Skip to main content
Announcements
Talend Data Catalog 8.0 End of Support: December 31, 2024 Get Details

How to reset forgotten PostgreSQL password in Qlik Sense Enterprise on Windows

No ratings
cancel
Showing results for 
Search instead for 
Did you mean: 
Bjorn_Wedbratt
Employee
Employee

How to reset forgotten PostgreSQL password in Qlik Sense Enterprise on Windows

Last Update:

Oct 3, 2023 6:45:28 AM

Updated By:

Troy_Raney

Created date:

Oct 13, 2014 6:56:49 AM




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. 

  1. 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.

    new service postgresqlx6412.pngqlik sense repository database service.png

  2. 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.  

  3. 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.

    all files or all types.png

  4. Open pg_hba.conf

  5. 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
  6. Save the file, close it

  7. Start the Qlik Sense Repository Database (or postgresql-x64-xx).

  8. Launch the Windows Command Line As Administrator.

  9. In the command line, navigate to the PostgreSQL bin folder
    cd "C:\Program files\Qlik\Sense\Repository\PostgreSQL\12.5\bin"
    *12.5 refers to the PostgreSQL version. Adjust accordingly depending on what version is installed.  

  10. Run psql to connect to the database: 
    psql -h 127.0.0.1 -p 4432 -U postgres​
    The response will provide the postgres=# prompt, which we will use to change the passwords.

    postgreqs prompt.png

  11. 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. 

    1. Change the postgres user account (you must include the single quotes and the semicolon):
      alter user postgres with encrypted password 'EnterYourNewPasswordHere';​

      Response:
      response postgre user change.png

    2. Change the qliksenserepository user account (you must include the single quotes and the semicolon):
      alter user qliksenserepository with encrypted password 'EnterYourNewPasswordHere';
      Response:
      response qliksenserepository user change.png

  12. Close the command prompt.

  13. Adjust the connection string using QlikSenseUtil

    1. Open QlikSenseUtil (C:\Program Files\Qlik\Sense\Repository\Util\QlikSenseUtil)

    2. Open the Connection String Editor tab

    3. Click Read

    4. Adjust the password

    5. Click Save Value in config file encrypted

      qliksenseutil.png


  14. Change the Connection Strings for Micro-Services as per Changing the Connection String for Micro-Services.
  15. Stop the Qlik Sense Repository Database (or postgresql-x64-xx).

  16. Revert the changes done to the pg_hba.conf file, changing back  METHOD from trust to md5 (alternative: scram-sha-256).

  17. 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. 

 


      
Labels (1)
Comments
houssamely
Contributor
Contributor

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,

hmjason7
Contributor II
Contributor II

Has anyone else come across any issues?

I managed to implement all the steps but am unable to access the QMC or Hub.

Sonja_Bauernfeind
Digital Support
Digital Support

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. 

 

cata_pli
Partner - Contributor III
Partner - Contributor III

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

piotr_kierul
Partner - Contributor III
Partner - Contributor III

@cata_pli  exactly!! 😂

Benoit_C
Support
Support

@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.

gkkandukuri
Contributor
Contributor

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"

 

Benoit_C
Support
Support

Hi @gkkandukuri,

What is your Postgres version ? 

Do you have a bundled Postgres Database or a Standalone ?

gkkandukuri
Contributor
Contributor

HI,

sorry i found the bin folder was looking in C drive instead of D drive

p_verkooijen
Partner - Specialist II
Partner - Specialist II

@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

Version history
Last update:
‎2023-10-03 06:45 AM
Updated by: