Hi everybody,
For an internal project, I'm working on a deployment shell script for SonarQube-4.5.5 with Postgresql-9.3.9 and OpenJDK 1.7.0_79 packaged in Ubuntu 14.04.3 LTS. With that script, I want to change the admin's password with just one curl. But I can't.
Here it is the commands I'm using :
This is the sonar_admin.json's content :
{
"login": "admin",
"name": "Administrator",
"password": "<new_password>",
"password_confirmation": "<new_password>"
}
And the response is : {"err_code":400,"err_msg":"Missing parameter: login"}
I've changed the sonar.properties in order to have more logs. The only logs I've seen were about the SQL queries executed :
2015.09.02 20:14:09 INFO http-bio-127.0.0.1-9000-exec-2 web[sql] 2ms Executed SQL: SELECT * FROM "users" WHERE (login='admin' AND active='t') LIMIT 1
2015.09.02 20:14:09 INFO http-bio-127.0.0.1-9000-exec-2 web[sql] 1ms Executed SQL: SELECT * FROM "groups" INNER JOIN "groups_users" ON "groups".id = "groups_users".group_id WHERE ("groups_users".user_id = 1 )
2015.09.02 20:14:09 INFO http-bio-127.0.0.1-9000-exec-2 web[sql] 1ms Executed SQL: SELECT role FROM "group_roles" WHERE (resource_id is null and (group_id is null or group_id in(1,2)))
2015.09.02 20:14:09 INFO http-bio-127.0.0.1-9000-exec-2 web[sql] 1ms Executed SQL: SELECT * FROM "user_roles" WHERE ("user_roles".user_id = 1)
2015.09.02 20:14:09 INFO http-bio-127.0.0.1-9000-exec-2 web[http] 36ms POST /sonar/api/users/update
In executing the 4th query, I found it weird that the "admin" user is not associated to the "admin" group :
sonar=# SELECT * FROM "user_roles" WHERE ("user_roles".user_id = 1);
id | user_id | resource_id | role
----+---------+-------------+------
Do you have any idea, please ?
Thank you
Rasmey