# Reset admin password

**URL:** <https://community.sonarsource.com/t/reset-admin-password/37971>\
**Category:** SonarQube Server / Community Build\
**Created:** [February 3, 2021, 10:35am UTC](https://community.sonarsource.com/t/reset-admin-password/37971 "2021-02-03T10:35:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jserrahima](https://avatars.discourse-cdn.com/v4/letter/j/e99b99/32.png) [@jserrahima](https://community.sonarsource.com/u/jserrahima)\
**Post date:** [February 3, 2021, 10:35am UTC](https://community.sonarsource.com/t/reset-admin-password/37971/1 "2021-02-03T10:35:56Z")

</div>

Hello,

I’m using SonarQube 8.5 and i cant change my admin password.

As docs says, i tried

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

```

Problem: There’s no reset\_password field on table users.

If i try deleting admin user and recreating

```auto
INSERT INTO user_roles(user_id, role, organization_uuid) 
VALUES ((select id from users where login='mylogin'), 
'admin', 
(select uuid from organizations where kee='default-organization'));

```

Problem: Fields change the name. Trying with new one’s neither works.

Can anyone help me?

Best regards.

---

<div class="post-metadata">

**Author:** ![jserrahima](https://avatars.discourse-cdn.com/v4/letter/j/e99b99/32.png) [@jserrahima](https://community.sonarsource.com/u/jserrahima)\
**Post date:** [February 3, 2021, 11:19am UTC](https://community.sonarsource.com/t/reset-admin-password/37971/2 "2021-02-03T11:19:22Z")

</div>

I found the resolution myself.

You have only to do it without _reset\_password=true_

just

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

```

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/system/32/31083_2.png) [@system](https://community.sonarsource.com/u/system)\
**Post date:** [February 10, 2021, 11:20am UTC](https://community.sonarsource.com/t/reset-admin-password/37971/3 "2021-02-10T11:20:08Z")

</div>

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