Search code examples
elasticsearch

elastic search index credentials retrieval issue


elastic search index not giving credentials when running elasticsearch.bat to bin directory and also not showing details on yaml file too

To retrieve user name and password using the path to elastic search bin directory and runnig the command elasticsearch.bat on cmd


Solution

  • The Elasticsearch user password is stored in an encrypted format and cannot be retrieved directly from the terminal for security reasons. However, you can reset the password using the Elasticsearch's built-in utility.

    If you have forgotten the password for the 'elastic' user, you can reset it using the 'elasticsearch-setup-passwords' tool. Here are the steps:

    ./bin/elasticsearch-setup-passwords interactive
    

    Other commands that you can use:

    ./bin/elasticsearch-users list
    

    https://www.elastic.co/guide/en/elasticsearch/reference/current/built-in-users.html