Lost access to Azure AD Stopped Working And local Admin was Deactivated

Must-share information (formatted with Markdown):

  • which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension)… sonarqube:9.3.0-developer
  • what are you trying to achieve… re-activate local admin
  • what have you tried so far to achieve this… connect to SQL and hoping to find a way to re-activate the local admin or perhaps create a new one

was able to connect to the SQL server and ran this one (saw it from the docs)

INSERT INTO user_roles(uuid, user_uuid, role) 
VALUES ('random-uuid',
(select uuid from users where login='mylogin'), 
'admin');

the actual command was…

INSERT INTO user_roles(uuid, user_uuid, role) 
VALUES ('eaef1aae-ae0d-435e-8784-e4f99eb71ce5',
(select uuid from users where login='admin'), 
'admin');

the SQL query did not come back with an error, but when i tried to logon as admin i still got the authentication failed.

would appreciate any suggestions. thank you

this is what worked (got this from SQ’s documentation)…

select * from users;
update users set active=1, salt=null where login = ‘admin’;
update users set crypted_password=‘100000$t2h8AtNs1AlCHuLobDjHQTn9XppwTIx88UjqUm4s8RsfTuXQHSd/fpFexAnewwPsO6jGFQUv/24DnO55hY6Xew==’, salt=‘k9x9eN127/3e/hf38iNiKwVfaVk=’, hash_method=‘PBKDF2’, reset_password=‘true’, user_local=‘true’ where login=‘admin’;

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