Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reset user password from sysadmin #10771

Closed
Borch97 opened this issue May 13, 2024 · 1 comment
Closed

Reset user password from sysadmin #10771

Borch97 opened this issue May 13, 2024 · 1 comment
Assignees
Labels
question generic question

Comments

@Borch97
Copy link

Borch97 commented May 13, 2024

Component

  • Generic

Description
I would like to be able to change or reset a user's password from the SYS_ADMIN role, without needing to know the user's password. I don't want the user to click the "I forgot my password" button, I want to manually reset the password.

Thank you very much in advance

@epalchenko
Copy link

Hello @Borch97

In case the password to the System Admin account was lost, you can restore it to the default - sysadmin
To do so, you need to go to your PSQL console:

psql -U postgres -h localhost -d thingsboard
And run this query:
update user_credentials SET password = '$2a$10$YMyxoU0hMOLmd9D7tz/dQeDY3fkXRAv8C023F6hzx2gVB9dTBUpq6' WHERE user_id=(select id from tb_user where authority = 'SYS_ADMIN');

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question generic question
Projects
None yet
Development

No branches or pull requests

4 participants