How to recover or update the NPrinting repository database super user password
Company policy may sometimes include the need to change the NPrinting PostgreSQL repository database password.
Depending on the version of NPrinting deployed, different methods are used.
Qlik NPrinting 19 to 20 and later
For Qlik NPrting releases beginning with February 2019, follow the steps outlined below. Note that these steps are written for PowerShell. The scripts are attached in individual .zip files.
How to recover the current NPrinting repository password
Use the attached Powershell script named RecoverNPRepoPassword.ps1 or Open Windows Powershell ISE as an administrator on your NPrinting server and run the script manually.
Note that an error may be printed when attempting to run the ps1 file:
The file ......RecoverNPRepoPassword.ps1 is not digitally signed. You cannot run this script on the current system. For more information about running scripts and setting execution policy, see about_Execution_Policies at http://go.microsoft.com/fwlink/?LinkID=135170.
In this case, run the following first to temporarily set the execution policy to bypass for only the current PowerShell session after the window is closed.
The command is:
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass
Click Yes on the popup window and proceed with running the provided script.
Open Windows Services.msc and stop all NPrinting services except QlikNprintnigRepoService
Browse to folder C:\Program Files\NPrintingServer\pgsql\bin and launch pgAdmin3.exe.
For Nprinting 18 go to C:\Program Files\NPrintingServer\pgsql\pgAdmin 4\binand launch pgamdmin4.exe
Click Add a connection to a server
Use the following details in New Server Registration Name: Nprinting Server: localhost Port: 4992 Maintenance DB: postgres (select from pull down) Username: postgres Password: The password that you entered during installation
Once connected, select Nprinting then go to File > Change Password...
Enter your old password and new password (x2) as requested
Part 2 - NPrinting
Open Windows Services.msc and stop the QlikNprintnigRepoService as well
Update the "pg-password" key value stored in these 2 config files to the new password: C:\Program Files\NPrintingServer\NPrinting\WebEngine\webengine.config C:\Program Files\NPrintingServer\NPrinting\Scheduler\scheduler.config