# Unable to change "elastic" user password

**URL:** <https://discuss.elastic.co/t/unable-to-change-elastic-user-password/326364>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-security\
**Created:** [February 23, 2023, 6:26pm UTC](https://discuss.elastic.co/t/unable-to-change-elastic-user-password/326364 "2023-02-23T18:26:36Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![SUNA](https://avatars.discourse-cdn.com/v4/letter/s/f05b48/32.png) [@SUNA](https://discuss.elastic.co/u/SUNA)\
**Post date:** [February 23, 2023, 6:26pm UTC](https://discuss.elastic.co/t/unable-to-change-elastic-user-password/326364/1 "2023-02-23T18:26:36Z")

</div>

```auto
Team,

Can you please help to change **elastic** user password.

root@elk:/usr/share/elasticsearch/bin# ls -lrt
total 20812
-rwxr-xr-x 1 root root 21220982 Jan 13 2021 elasticsearch-sql-cli-7.10.2.jar
-rwxr-xr-x 1 root root 118 Jan 13 2021 elasticsearch-shard
-rwxr-xr-x 1 root root 172 Jan 13 2021 elasticsearch-plugin
-rwxr-xr-x 1 root root 126 Jan 13 2021 elasticsearch-node
-rwxr-xr-x 1 root root 184 Jan 13 2021 elasticsearch-keystore
-rwxr-xr-x 1 root root 1828 Jan 13 2021 elasticsearch-env-from-file
-rwxr-xr-x 1 root root 4597 Jan 13 2021 elasticsearch-env
-rwxr-xr-x 1 root root 996 Jan 13 2021 elasticsearch-cli
-rwxr-xr-x 1 root root 2877 Jan 13 2021 elasticsearch
-rwxr-xr-x 1 root root 353 Jan 13 2021 x-pack-watcher-env
-rwxr-xr-x 1 root root 354 Jan 13 2021 x-pack-security-env
-rwxr-xr-x 1 root root 346 Jan 13 2021 x-pack-env
-rwxr-xr-x 1 root root 426 Jan 13 2021 elasticsearch-users
-rwxr-xr-x 1 root root 426 Jan 13 2021 elasticsearch-syskeygen
-rwxr-xr-x 1 root root 441 Jan 13 2021 elasticsearch-sql-cli
-rwxr-xr-x 1 root root 438 Jan 13 2021 elasticsearch-setup-passwords
-rwxr-xr-x 1 root root 431 Jan 13 2021 elasticsearch-saml-metadata
-rwxr-xr-x 1 root root 440 Jan 13 2021 elasticsearch-migrate
-rwxr-xr-x 1 root root 433 Jan 13 2021 elasticsearch-croneval
-rwxr-xr-x 1 root root 483 Jan 13 2021 elasticsearch-certutil
-rwxr-xr-x 1 root root 491 Jan 13 2021 elasticsearch-certgen
-rwxr-xr-x 1 root root 332 Jan 13 2021 systemd-entrypoint

I have tried to to run below command. but it didn't work.

root@elk:/usr/share/elasticsearch/bin# ./elasticsearch-setup-passwords interactive

**Failed to authenticate user 'elastic' against http://139.59.50.340:9200/_security/_authenticate?pretty**
 **Possible causes include:**
 * The password for the 'elastic' user has already been changed on this cluster
 * Your elasticsearch node is running against a different keystore
   This tool used the keystore at /etc/elasticsearch/elasticsearch.keystore

**ERROR: Failed to verify bootstrap password**

```

---

<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:** [February 23, 2023, 8:23pm UTC](https://discuss.elastic.co/t/unable-to-change-elastic-user-password/326364/2 "2023-02-23T20:23:49Z")

</div>

What version exactly are you running? 7.10.2?... **very old**

The setup is only used once think you need to use the users command

> **[elasticsearch-users | Elasticsearch Guide \[7.10\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/7.10/users-command.html)**

---

<div class="post-metadata">

**Author:** ![SUNA](https://avatars.discourse-cdn.com/v4/letter/s/f05b48/32.png) [@SUNA](https://discuss.elastic.co/u/SUNA)\
**Post date:** [February 24, 2023, 2:52am UTC](https://discuss.elastic.co/t/unable-to-change-elastic-user-password/326364/3 "2023-02-24T02:52:43Z")

</div>

@stephenb Thanks for your reply.

Yes the Elasticsearch version is 7.10.2 .

This password i need to change. I have tried users command as you suggested. getting below error.

```auto

root@elk:/usr/share/elasticsearch/bin# ./elasticsearch-users passwd elastic

ERROR: Invalid username [elastic]... Username [elastic] is reserved and may not be used.

root@elk:/usr/share/elasticsearch/bin#

```

Please help command to reset elastic user password.

---

<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:** [February 24, 2023, 3:29am UTC](https://discuss.elastic.co/t/unable-to-change-elastic-user-password/326364/4 "2023-02-24T03:29:40Z")

</div>

Ahhh yes thats right and let me guess you do not know the current elastic user password?

Take a look at this... this is not easy...

This is our expert on the subject

> [@X-Pack Authentication issue](https://discuss.elastic.co/t/x-pack-authentication-issue/121632/7):
>
> This is a revised version of [this post](https://discuss.elastic.co/t/i-lost-the-password-that-has-been-changed/91867/2) Help! I don't have the password for the elastic user! Pre-reading: The password setup in Elasticsearch 6.x depends on a "bootstrap password" that is set on each node in your cluster. This password is documented here: [https://www.elastic.co/guide/en/x-pack/6.2/setting-up-authentication.html#bootstrap-elastic-passwords](https://www.elastic.co/guide/en/x-pack/6.2/setting-up-authentication.html#bootstrap-elastic-passwords) If you do not have a fixed password for the elastic user, then it uses the bootstrap password. X-Pack security includes an API to chan…

---

<div class="post-metadata">

**Author:** ![SUNA](https://avatars.discourse-cdn.com/v4/letter/s/f05b48/32.png) [@SUNA](https://discuss.elastic.co/u/SUNA)\
**Post date:** [February 24, 2023, 5:18am UTC](https://discuss.elastic.co/t/unable-to-change-elastic-user-password/326364/5 "2023-02-24T05:18:51Z")

</div>

@stephenb I had old password. I have changed the password using ELK console. Thanks.

Since the password was shared and i had tried to change.

Thanks for your prompt reply

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [March 24, 2023, 5:19am UTC](https://discuss.elastic.co/t/unable-to-change-elastic-user-password/326364/6 "2023-03-24T05:19:27Z")

</div>

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