Unable to change "elastic" user password

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**


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

@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.


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.

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

@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

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