# Unable to change elastic user password

**URL:** https://discuss.elastic.co/t/unable-to-change-elastic-user-password/122887
**Category:** Elasticsearch
**Created:** [March 7, 2018, 1:06pm UTC](https://discuss.elastic.co/t/unable-to-change-elastic-user-password/122887 "2018-03-07T13:06:31Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![annk](https://avatars.discourse-cdn.com/v4/letter/a/c68b51/32.png) [@annk](https://discuss.elastic.co/u/annk)
#### Post date: [March 7, 2018, 1:06pm UTC](https://discuss.elastic.co/t/unable-to-change-elastic-user-password/122887/1 "2018-03-07T13:06:32Z")

</div>

I recently upgraded from 6.1 to 6.2. Until I installed x-pack plugin on elasticsearch and kibana I was able to query elastic using elastic user and empty password.

I tried following this documentation ([https://www.elastic.co/guide/en/elasticsearch/reference/current/installing-xpack-es.html](https://www.elastic.co/guide/en/elasticsearch/reference/current/installing-xpack-es.html)) but I am getting this error.

# bin/x-pack/setup-passwords interactive

Failed to authenticate user 'elastic' against [http://loclhost:9200/\_xpack/security/\_authenticate?pretty](http://loclhost:9200/_xpack/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

I also tried to change the password for elastic user , this is what I got .

curl -XPOST -u elastic 'localhost:9200/\_xpack/security/user/elastic/\_password?pretty' -H 'Content-Type: application/json' -d'  
{  
"password": "password"  
}  
'  
Enter host password for user 'elastic':  
{  
"error" : {  
"root\_cause" : [  
{  
"type" : "security\_exception",  
"reason" : "failed to authenticate user [elastic]",  
"header" : {  
"WWW-Authenticate" : "Basic realm="security" charset="UTF-8""  
}  
}  
],  
"type" : "security\_exception",  
"reason" : "failed to authenticate user [elastic]",  
"header" : {  
"WWW-Authenticate" : "Basic realm="security" charset="UTF-8""  
}  
},  
"status" : 401  
}

---

<div class="post-metadata">

### Author: ![rashmi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rashmi/32/16391_2.png) [@rashmi](https://discuss.elastic.co/u/rashmi)
#### Post date: [March 7, 2018, 7:34pm UTC](https://discuss.elastic.co/t/unable-to-change-elastic-user-password/122887/2 "2018-03-07T19:34:50Z")

</div>

> [@annk](#):
>
> ERROR: Failed to verify bootstrap password

setup-passwords ( [elasticsearch-setup-passwords | Elasticsearch Guide [8.11] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/setup-passwords.html)) uses the bootstrap password( [Setting Up User Authentication | X-Pack for the Elastic Stack [6.0] | Elastic](https://www.elastic.co/guide/en/x-pack/6.0/setting-up-authentication.html#bootstrap-elastic-passwords)) in order to set the password for the users. After you set a password for the elastic user, the bootstrap password is no longer active and this is why you get the second error

ERROR: Failed to verify bootstrap password.

Were you able to login with either kibana or logstash\_system users and their auto-generated passwords ?

Now, if you don't remember the original password for elastic that setup-passwords created, or if you in any case need to reset it to something new, you can follow the instructions that @TimV has shared in this answer( [I lost the password that has been changed - #2 by TimV](https://discuss.elastic.co/t/i-lost-the-password-that-has-been-changed/91867/2))

Hope this helps,

Thanks  
Rashmi

---

<div class="post-metadata">

### Author: ![annk](https://avatars.discourse-cdn.com/v4/letter/a/c68b51/32.png) [@annk](https://discuss.elastic.co/u/annk)
#### Post date: [March 8, 2018, 12:41pm UTC](https://discuss.elastic.co/t/unable-to-change-elastic-user-password/122887/3 "2018-03-08T12:41:28Z")

</div>

Thanks.

I am still not able to reset password for elastic user following post mentioned above , but I was able to create another superuser and solve my problem that way.

curl -XPOST -u my\_admin 'localhost:9200/\_xpack/security/user/elastic/\_password?pretty' -H 'Content-Type: application/json' -d'  
{  
"password": "password"  
}

> '  
> Enter host password for user 'admin':  
> {  
> "error" : {  
> "root\_cause" : [  
> {  
> "type" : "index\_not\_found\_exception",  
> "reason" : "no such index",  
> "resource.type" : "index\_or\_alias",  
> "resource.id" : ".security-6",  
> "index\_uuid" : "_na_",  
> "index" : ".security-6"  
> }  
> ],  
> "type" : "index\_not\_found\_exception",  
> "reason" : "no such index",  
> "resource.type" : "index\_or\_alias",  
> "resource.id" : ".security-6",  
> "index\_uuid" : "_na_",  
> "index" : ".security-6"  
> },  
> "status" : 404  
> }

---

<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: [April 5, 2018, 12:41pm UTC](https://discuss.elastic.co/t/unable-to-change-elastic-user-password/122887/4 "2018-04-05T12:41:34Z")

</div>

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