Regarding sonarqube admin Privileges - Lost admin rights for default account

Hi,

Good Evening. Hope you are doing great.

We are running into an issue regarding sonarqube community edition default admin account privileges. Somehow the system is not allowing to perform admin access rights for default account and unable to perform any admin level function. Like unable to add any user/group etc.,.

resetting admin password also didn’t help…

Hi,

The docs address this:

If you’ve deleted admin and subsequently locked out the other users with global administrative permissions, you’ll need to re-grant admin to a user with the following query:

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

 
Ann

If I am using the embedded DB, what is the process of running this command ?

Hi,

If you’re using the embedded DB, then the process is to throw away its data files and start again. H2 is only for evaluation, not production.

 
Ann