MMA
MMA

Reputation: 458

Sonarqube authentication

I just installed sonarqube. As part of automation i am required to change the admin password through command line. I see there is a document to reset the admin credentials by running the query. I am wondering where do i run the query.

update users set crypted_password = '88c991e39bb88b94178123a849606905ebf440f5', salt='6522f3c5007ae910ad690bb1bdbf264a34884c6d' where login = 'admin'

I am using official docker image for sonarqube. I logged into container and don't see any mysql, sql, psql installed. So i which DB exactly i need to login and run the query.

Upvotes: 0

Views: 2313

Answers (2)

Eric Hartmann
Eric Hartmann

Reputation: 1701

SonarQube Docker images are using the H2 embedded database, and this one must not be used for production, you should configure SonarQube to use another database (MySQL, Postgresql, Microsoft SQL Server or Oracle).

Then you can run the query in one of those database.

You can also use Web API to change the password of a user such as https://sonarcloud.io/web_api/api/users (this will work with any database)

Upvotes: 0

Siddhesh Salgaonkar
Siddhesh Salgaonkar

Reputation: 163

You might want to refer this for your question - Installing the Server. Basically, <install_directory>/conf/sonar.properties has instructions for setting up the database if required.

Upvotes: 1

Related Questions