# Elasticsearch-setup-passwords commands with ERROR: Failed to verify bootstrap password

**URL:** https://discuss.elastic.co/t/elasticsearch-setup-passwords-commands-with-error-failed-to-verify-bootstrap-password/267441
**Category:** Elasticsearch
**Created:** [March 17, 2021, 4:49am UTC](https://discuss.elastic.co/t/elasticsearch-setup-passwords-commands-with-error-failed-to-verify-bootstrap-password/267441 "2021-03-17T04:49:44Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Willy](https://avatars.discourse-cdn.com/v4/letter/w/c2a13f/32.png) [@Willy](https://discuss.elastic.co/u/Willy)
#### Post date: [March 17, 2021, 4:49am UTC](https://discuss.elastic.co/t/elasticsearch-setup-passwords-commands-with-error-failed-to-verify-bootstrap-password/267441/1 "2021-03-17T04:49:45Z")

</div>

I am new to ElasticSearch.

I followed the steps in this page: [Configuring SSL, TLS, and HTTPS to secure Elasticsearch, Kibana, Beats, and Logstash](https://www.elastic.co/blog/configuring-ssl-tls-and-https-to-secure-elasticsearch-kibana-beats-and-logstash)

I used  
`bin/elasticsearch-setup-passwords interactive -u 'https://abc.mysite.com:9200'`  
on step **[2-6-4] Set built-in user password**

Everything is fine to setup the service with SSL certificates. However, I want to change the password of 'elastic', and run  
`bin/elasticsearch-setup-passwords interactive -u 'https://abc.mysite.com:9200'`  
again.

I encounter the following error:  
$ bin/elasticsearch-setup-passwords interactive -u '[https://abc.mysite.com:9200](https://abc.mysite.com:9200)'

```
Failed to authenticate user 'elastic' against 
https://abc.mysite.com: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
$

```

I also visit this post [After X-pack Installation : Failed to authenticate user [elastic]](https://discuss.elastic.co/t/after-x-pack-installation-failed-to-authenticate-user-elastic/224416), understand that [Change Password API](https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-change-password.html) can change the password of 'elastic' account:  
` curl -u elastic -XPUT 'https://abc.mysite.com:9200/_xpack/security/user/elastic/_password?pretty' -H 'Content-Type: application/json' -d'{"password":"12345678"}' -k`

1. May I know whether the error above must happen in the second time or later after the first run of 'elasticsearch-setup-passwords'?
2. I do not know about what "bootstrap password" is. I do not change it. Is there a possible way I changed it in this page: [Configuring SSL, TLS, and HTTPS to secure Elasticsearch, Kibana, Beats, and Logstash](https://www.elastic.co/blog/configuring-ssl-tls-and-https-to-secure-elasticsearch-kibana-beats-and-logstash) but I did not know?
3. Can I have a way to use 'elasticsearch-setup-passwords' again? if not, does it mean 'elasticsearch-setup-passwords' is a once-time-command?

I am using a Cluster with 3 nodes. 2 nodes have these roles: dilmrt, and 1 node has these roles: dmv

---

<div class="post-metadata">

### Author: ![TimV](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/timv/32/13162_2.png) [@TimV](https://discuss.elastic.co/u/TimV)
#### Post date: [March 18, 2021, 2:42am UTC](https://discuss.elastic.co/t/elasticsearch-setup-passwords-commands-with-error-failed-to-verify-bootstrap-password/267441/2 "2021-03-18T02:42:24Z")

</div>

> [@Willy](#):
>
> Can I have a way to use 'elasticsearch-setup-passwords' again? if not, does it mean 'elasticsearch-setup-passwords' is a once-time-command?

You cannot run that command twice, it is quite explicitly a _setup process_ that is run once.

See: [elasticsearch-setup-passwords | Elasticsearch Guide [8.11] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/setup-passwords.html)

> This command is intended for use only during the initial configuration of the Elasticsearch security features. It uses the [`elastic` bootstrap password](https://www.elastic.co/guide/en/elasticsearch/reference/current/built-in-users.html#bootstrap-elastic-passwords) to run user management API requests. If your Elasticsearch keystore is password protected, before you can set the passwords for the built-in users, you must enter the keystore password. After you set a password for the `elastic` user, the bootstrap password is no longer active and you cannot use this command.

---

<div class="post-metadata">

### Author: ![Willy](https://avatars.discourse-cdn.com/v4/letter/w/c2a13f/32.png) [@Willy](https://discuss.elastic.co/u/Willy)
#### Post date: [March 18, 2021, 4:51am UTC](https://discuss.elastic.co/t/elasticsearch-setup-passwords-commands-with-error-failed-to-verify-bootstrap-password/267441/3 "2021-03-18T04:51:51Z")

</div>

Thank you so much. You saved my time.

It is better not to use "ERROR:".

---

<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 15, 2021, 4:52am UTC](https://discuss.elastic.co/t/elasticsearch-setup-passwords-commands-with-error-failed-to-verify-bootstrap-password/267441/4 "2021-04-15T04:52:31Z")

</div>

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