Skip to main content
Announcements
Defect acknowledgement with Nprinting Engine May 2022 SR2, please READ HERE
cancel
Showing results for 
Search instead for 
Did you mean: 
oswa44
Contributor II
Contributor II

Is there a way to recover Administration role after Admin User has been deleted?

Hi,

I have removed Administrator Role for my user and other user who has same role left company so we cannot login to his profile.

So now no one has admin role in company.

How to solve this problem?

Is there any possibility in NPrinting module on server to see roles and users?

Or somewhere to see user login information?

Thanks in advance

 

Labels (2)
1 Solution

Accepted Solutions
Ruggero_Piccoli
Support
Support

Hi,

I think the less dangerous way is to create again that email, recover the Qlik NPrinting password, login and assign administrator role to other users and then delete the email. When you are able to login in Qlik NPrinting again as administrator it will be good to remove users related to people that are no more working in the company to avoid to have the same issue in the future.

I would like to avoid to run SQL to update the repository because you could damage it. If you decide to apply the suggested Insert please make a backup before proceeding or open a support ticket.

Best Regards,

Ruggero 



Best Regards,
Ruggero
---------------------------------------------
When applicable please mark the appropriate replies as CORRECT. This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution. Please mark threads with a LIKE if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads with LIKEs if you feel additional info is useful to others.

View solution in original post

7 Replies
Lech_Miszkiewicz
Partner Ambassador/MVP
Partner Ambassador/MVP

Hi, How about logging on as a NPrinting admin account - using nprinting authentication and account which was created during NPrinting installation (probably service account) ?

!!! Next steps are not supported by Qlik and can be damaging to your setup !!!

If that is not an option then there is a way bay assigning a role to you via Postgres database - I am going to say that much only for now - for the reasons that if you don't know what I am talking about then it is better not to touch it, however if you do know then you can just browse postgres repository db using tools like cmd (or pgadmin) and run query to assign correct role to your user using SQL commands.

If all that is still too hard - I suggest contacting Qlik support or Qlik partner to get that fixed for you as risk of damaging NPrinting environment is too great.

 

links:

Backup before making any changes: https://www.youtube.com/watch?v=bJiO3m7kb10

Connecting to repository db: https://community.qlik.com/t5/Knowledge/How-to-Connect-to-the-PostgreSQL-Database-used-for-Qlik/ta-p...

From here you only need to:

  • find "usr", "role" and "role_recipient" tables
    • Lech_Miszkiewicz_0-1656748861103.png

       

  • obtain admin role_id from roles table
    • Lech_Miszkiewicz_2-1656749234978.png

       

  • obtain recipient_id from usr table
    • Lech_Miszkiewicz_1-1656749180511.png
  • Insert extra record into role_recipient table containing record of your recipient id and administrator role id

    • INSERT INTO role_recipient
      (recipient_id, role_id)
      VALUES
      ('2deaff27-896c-402b-b599-5d4a9129bc17','b30765aa-695e-4f7c-b842-ac52eda61e3f');
    •  

      note that in place where i placed values (ids) you need to provide those which you have found following previous steps

I am not sure if this will take effect straight away, but if you are successful you should have one more record in your role_recipient table and after restarting repository you should have access back again

 

If you want to do all above - do it at your own risk!!!

 

cheers Lech, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful to the problem.
Ruggero_Piccoli
Support
Support

Hi,

It is impossible, or, it should be impossible, because Qlik NPrinting doesn't allow you to delete all users with Administrator role from the Web Console. When you try to delete latest user with Administrator role you will receive and error message and you cannot go ahead.

So you still have at least one user with Administrator role and you can discover it by connecting to the repository and running the following select query:

SELECT public.usr.domain_account, public.usr.email
FROM public.role, public.role_recipient, public.usr
where
public.role.name = 'Administrator' and
public.role.id = public.role_recipient.role_id and
public.role_recipient.recipient_id = public.usr.recipient_id

Then login with latest administrator and assign the Administrator role to all users you want without the need to run an Insert SQL instruction that could be dangerous. 

If you are not skilled with SQL and PGAdmin please open a support ticket.

Best Regards,

Ruggero



Best Regards,
Ruggero
---------------------------------------------
When applicable please mark the appropriate replies as CORRECT. This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution. Please mark threads with a LIKE if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads with LIKEs if you feel additional info is useful to others.
oswa44
Contributor II
Contributor II
Author

Hi, yes there is user, but this user is for person who already not working in a company, so we don't know user password and cannot connect with it. Maybe in repository we can find login information for user?

Ruggero_Piccoli
Support
Support

Hi,

You cold try to reset the password of that user https://help.qlik.com/en-US/nprinting/May2022/Content/NPrinting/Recipients&Users/Changing-user-passw... 

Best Regards,

Ruggero



Best Regards,
Ruggero
---------------------------------------------
When applicable please mark the appropriate replies as CORRECT. This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution. Please mark threads with a LIKE if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads with LIKEs if you feel additional info is useful to others.
oswa44
Contributor II
Contributor II
Author

But we cannot connect to user mailbox to open email because mailbox doesn't exist anymore.

Ruggero_Piccoli
Support
Support

Hi,

I think the less dangerous way is to create again that email, recover the Qlik NPrinting password, login and assign administrator role to other users and then delete the email. When you are able to login in Qlik NPrinting again as administrator it will be good to remove users related to people that are no more working in the company to avoid to have the same issue in the future.

I would like to avoid to run SQL to update the repository because you could damage it. If you decide to apply the suggested Insert please make a backup before proceeding or open a support ticket.

Best Regards,

Ruggero 



Best Regards,
Ruggero
---------------------------------------------
When applicable please mark the appropriate replies as CORRECT. This will help community members and Qlik Employees know which discussions have already been addressed and have a possible known solution. Please mark threads with a LIKE if the provided solution is helpful to the problem, but does not necessarily solve the indicated problem. You can mark multiple threads with LIKEs if you feel additional info is useful to others.
oswa44
Contributor II
Contributor II
Author

Thanks both of you for help, we activated email and changed password of that last user.