Fundamentals of Securing Elasticsearch- reset environment

Hi

I am trying Fundamentals of Securing Elasticsearch I have one issue:

1: Looks like I need reset machines to default, forgot the password I set for user (I tried restart machine but it didn't work). Advise how to reset the environment

now when I enable the x-pack and try to run ./elasticsearch/bin/elasticsearch-setup-passwords interactive

It gives me following error

Failed to authenticate user 'elastic' against http://172.18.0.2: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 /home/elastic/elasticsearch/config/elasticsearch.keystore

How do I reset the environment to default rather than trouble shooting the keysotre.

Thanks in advance

Hello Mr X0rcist,

If you lost your password, I recommend you to use the elasticsearch-users command line to add a new user.

Run the following command on server1 :

elasticsearch/bin/elasticsearch-users useradd superuser -p password -r superuser

You can then use this new user to update the password of the elastic user:

curl -X POST "superuser:password@server1:9200/_security/user/elastic/_password?pretty" -H 'Content-Type: application/json' -d' 
{                                                                                                                                                                                  
  "password" : "newpassword"                                                                                                                              
}'

Have a good day,

Romain

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