Achyut
Achyut

Reputation: 367

How to run bin/elasticsearch-setup-passwords auto through REST API?

I need to direct update the password at the initial phase and not want to go through generating random password to provide access to user through rest API. please help

Upvotes: 0

Views: 1855

Answers (1)

ibexit
ibexit

Reputation: 3667

First, you need to set bootstrap.password in the Keystore before starting Elasticsearch. (If you`re using docker, there is an env variable for this purpose too.)

Afterward, you can use the elastic user and the previously set bootstrap.password in order to update the build-in user's password via the REST-Api. This approach is also described here.

Consider also changing the password for the build-in elastic user.

Upvotes: 2

Related Questions