# Could not set the passworkd after enable the security

**URL:** <https://discuss.elastic.co/t/could-not-set-the-passworkd-after-enable-the-security/308967>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-security\
**Created:** [July 6, 2022, 2:14am UTC](https://discuss.elastic.co/t/could-not-set-the-passworkd-after-enable-the-security/308967 "2022-07-06T02:14:29Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ericsoul](https://avatars.discourse-cdn.com/v4/letter/e/eb9ed0/32.png) [@ericsoul](https://discuss.elastic.co/u/ericsoul)\
**Post date:** [July 6, 2022, 2:14am UTC](https://discuss.elastic.co/t/could-not-set-the-passworkd-after-enable-the-security/308967/1 "2022-07-06T02:14:29Z")

</div>

ElasticSearch version:7.12

After enable the xpack security with the guide：

> **[Set up basic security for the Elastic Stack | Elasticsearch Guide \[master\] |...](https://www.elastic.co/guide/en/elasticsearch/reference/master/security-basic-setup.html#generate-certificates)**

To set password, then get the error:

```auto
bin/elasticsearch-setup-passwords interactive
future versions of Elasticsearch will require Java 11; your Java version from [/usr/java/jdk1.8.0_221-amd64/jre] does not meet this requirement

Failed to authenticate user 'elastic' against http://127.0.0.1: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 /opt/cloudera/parcels/ELASTICSEARCH/lib/elasticsearch/config/elasticsearch.keystore

ERROR: Failed to verify bootstrap password

```

---

<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:** [July 6, 2022, 5:56am UTC](https://discuss.elastic.co/t/could-not-set-the-passworkd-after-enable-the-security/308967/2 "2022-07-06T05:56:30Z")

</div>

The possible causes are listed in the error message. You should start by checking each of those.

---

<div class="post-metadata">

**Author:** ![ericsoul](https://avatars.discourse-cdn.com/v4/letter/e/eb9ed0/32.png) [@ericsoul](https://discuss.elastic.co/u/ericsoul)\
**Post date:** [July 6, 2022, 6:42am UTC](https://discuss.elastic.co/t/could-not-set-the-passworkd-after-enable-the-security/308967/3 "2022-07-06T06:42:49Z")

</div>

How to check if the password for the 'elastic' user has already been changed?  
And how to check the elasticsearch node is running against a different keystore

---

<div class="post-metadata">

**Author:** ![ericsoul](https://avatars.discourse-cdn.com/v4/letter/e/eb9ed0/32.png) [@ericsoul](https://discuss.elastic.co/u/ericsoul)\
**Post date:** [July 6, 2022, 7:08am UTC](https://discuss.elastic.co/t/could-not-set-the-passworkd-after-enable-the-security/308967/4 "2022-07-06T07:08:42Z")

</div>

> [@ericsoul](#):
>
> How to check if the password for the 'elastic' user has already been changed?  
> And how to check the elasticsearch node is running against a different keystore

The cluster is build fresh. I never changed the password for elastic.  
And I generate the keystore file at /opt/cloudera/parcels/ELASTICSEARCH/lib  
/elasticsearch/config/elasticsearch.keystore

but I don't know how to check the es node is running with any keystore

in elasticsearch.yml

```yaml
xpack.security.transport.ssl.keystore.path: /opt/cloudera/parcels/ELASTICSEARCH/lib/elasticsearch/config/certs/elastic-certificates.p12

```

generate the file `elastic-certificates.p12` without enter any password

---

<div class="post-metadata">

**Author:** ![ericsoul](https://avatars.discourse-cdn.com/v4/letter/e/eb9ed0/32.png) [@ericsoul](https://discuss.elastic.co/u/ericsoul)\
**Post date:** [July 6, 2022, 7:38am UTC](https://discuss.elastic.co/t/could-not-set-the-passworkd-after-enable-the-security/308967/5 "2022-07-06T07:38:37Z")

</div>

I grep the elasticsearch proccess,and get the proccess run with paramater:

```nohighlight
cd /opt/cloudera/parcels/ELASTICSEARCH-7.12.1/lib/elasticsearch/bin/ && export ES_PATH_CONF=/opt/cloudera/parcels/ELASTICSEARCH-7.12.1/lib/elasticsearch/config/es-master01 && JAVA_HOME=/opt/cloudera/parcels/ELASTICSEARCH-7.12.1/lib/elasticsearch/jdk/

```

Then I run it before `./elasticsearch-setup-passwords interactive`

The problem resolved.

---

<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:** [August 3, 2022, 7:39am UTC](https://discuss.elastic.co/t/could-not-set-the-passworkd-after-enable-the-security/308967/6 "2022-08-03T07:39:26Z")

</div>

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