# How to reset password?

**URL:** <https://discuss.elastic.co/t/how-to-reset-password/365906>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-security\
**Created:** [September 2, 2024, 2:33pm UTC](https://discuss.elastic.co/t/how-to-reset-password/365906 "2024-09-02T14:33:46Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![stephane\_chan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephane_chan/32/122193_2.png) [@stephane\_chan](https://discuss.elastic.co/u/stephane_chan)\
**Post date:** [September 2, 2024, 2:33pm UTC](https://discuss.elastic.co/t/how-to-reset-password/365906/1 "2024-09-02T14:33:46Z")

</div>

Hi ,

I forgot my password for my elasticsearch  
I configured my elasticsearch.yml with:

- network.host: 0.0.0.0
- discovery.seed\_hosts: [“127.0.0.1”, “[::1]”]
- discovery.type: single-node
- xpack.security.enabled: true

I ran the command before

`./bin/elasticsearch-setup-passwords interactive`

is there any way to change my password again?

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [September 2, 2024, 2:38pm UTC](https://discuss.elastic.co/t/how-to-reset-password/365906/2 "2024-09-02T14:38:41Z")

</div>

@stephane_chan

what version are you on...

`https://www.elastic.co/guide/en/elasticsearch/reference/current/reset-password.html`

---

<div class="post-metadata">

**Author:** ![stephane\_chan](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephane_chan/32/122193_2.png) [@stephane\_chan](https://discuss.elastic.co/u/stephane_chan)\
**Post date:** [September 3, 2024, 6:08am UTC](https://discuss.elastic.co/t/how-to-reset-password/365906/3 "2024-09-03T06:08:03Z")

</div>

I'm using elasticsearch version 7.17

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [September 3, 2024, 2:29pm UTC](https://discuss.elastic.co/t/how-to-reset-password/365906/4 "2024-09-03T14:29:13Z")

</div>

Hi @stephane_chan

Not easy in 7.17 take a look at this post

In short you need to create a new local superuser  
Then reset the elastic password using the API and that new super user.

> [@Reset Elasticsearch Internal User Password](https://discuss.elastic.co/t/reset-elasticsearch-internal-user-password/313837/6):
>
> What you need is to define a superuser with elasticsearch-users CLI. Then use that newly created user to call [ChangePassword API](https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-change-password.html) to change password for the elastic user. As @warkolm mentioned, you could use elasticsearch-reset-password if you are on version 8.x, which basically automates the above process for you (it also deletes the newly created user after the password change is completed).

> [@How to reset built in elastic password?](https://discuss.elastic.co/t/how-to-reset-built-in-elastic-password/264829/2):
>
> You can simply use Change Passwords API explained here: [Change passwords API | Elasticsearch Reference [7.11] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-change-password.html) If you do not have any access to change your password, you can create a superuser, login with that user and then change your password using the command-line API or Kibana UI itself. As the document says: [Create or update users API | Elasticsearch Reference [7.11] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-put-user.html) You will need to provide your username password in kibana.yml to access your dashboard as well: [...] e…
