3

Environment - Mac

I have configured SonarQube earlier, after that various other configuration might removed my admin user or something happen. But today I am not able to access my admin account/user.

Any one have idea how to regain the not only access but also admin user because I mentioned earlier, Settings tab is not visible on Sonar dashboard!

0

You can only see these options if you have admin.

Do you have it configured to use AD credentials ? its possible to lock yourself out if AD goes wrong (e.g. machine account expired or AD server not available)

Its a very secure system to you will probably have to reinstall if you have lost the admin password.

0

As per SonarQube documentation you have two options:

a) in case you have forgot your admin password

Execute this query on database for SonarQube to set password back to 'admin' for user admin.

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

b) in case you have deleted / modified admin user account

Execute this query and grand admin permission (do not forget to change 'mylogin' to corresponding account):

INSERT INTO user_roles(user_id, role) VALUES ((select id from users where login='mylogin'), 'admin');

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.