Reset admin password

Hello,

I’m using SonarQube 8.5 and i cant change my admin password.

As docs says, i tried

update users set crypted_password = '$2a$12$uCkkXmhW5ThVK8mpBvnXOOJRLd64LJeHTeCkSuB3lfaR2N0AYBaSi', salt=null, hash_method='BCRYPT', reset_password=true where login = 'admin'

Problem: There’s no reset_password field on table users.

If i try deleting admin user and recreating

INSERT INTO user_roles(user_id, role, organization_uuid) 
VALUES ((select id from users where login='mylogin'), 
'admin', 
(select uuid from organizations where kee='default-organization'));

Problem: Fields change the name. Trying with new one’s neither works.

Can anyone help me?

Best regards.

I found the resolution myself.

You have only to do it without reset_password=true

just

update users set crypted_password = '$2a$12$uCkkXmhW5ThVK8mpBvnXOOJRLd64LJeHTeCkSuB3lfaR2N0AYBaSi', salt=null, hash_method='BCRYPT' where login = 'admin';
1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.