# Reset master admin password

**URL:** <https://forum.keycloak.org/t/reset-master-admin-password/20305>\
**Category:** Getting advice\
**Tags:** admin-console\
**Created:** [February 17, 2023, 3:10pm UTC](https://forum.keycloak.org/t/reset-master-admin-password/20305 "2023-02-17T15:10:36Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![nikkizol](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/nikkizol/32/7712_2.png) [@nikkizol](https://forum.keycloak.org/u/nikkizol)\
**Post date:** [February 17, 2023, 3:10pm UTC](https://forum.keycloak.org/t/reset-master-admin-password/20305/1 "2023-02-17T15:10:36Z")

</div>

Dear team,

I am running locally `./kc.sh start-dev` and I forgot my password. Is there a way to reset master password? keycloak 20.0.2

Thank you for your help.

---

<div class="post-metadata">

**Author:** ![ben.overcash](https://avatars.discourse-cdn.com/v4/letter/b/d9b06d/32.png) [@ben.overcash](https://forum.keycloak.org/u/ben.overcash)\
**Post date:** [February 19, 2023, 1:14am UTC](https://forum.keycloak.org/t/reset-master-admin-password/20305/2 "2023-02-19T01:14:38Z")

</div>

If you have access to the database you could delete the master user out of the ENTITY and CREDENTIAL tables to trigger a reprompt.

I’ve not tried this so you should definitely backup that data first in case it causes an issue…

---

<div class="post-metadata">

**Author:** ![Raaj\_123](https://avatars.discourse-cdn.com/v4/letter/r/13edae/32.png) [@Raaj\_123](https://forum.keycloak.org/u/Raaj_123)\
**Post date:** [February 19, 2023, 2:04pm UTC](https://forum.keycloak.org/t/reset-master-admin-password/20305/3 "2023-02-19T14:04:22Z")

</div>

If you have the access to database you can execute this commands  
Export keycloak\_admin={new username}  
Export keycloak\_admin\_password={new password}
