# Can I set built-in users passwords in elasticsearch-keystore?

**URL:** https://discuss.elastic.co/t/can-i-set-built-in-users-passwords-in-elasticsearch-keystore/197540
**Category:** Elasticsearch
**Tags:** elastic-stack-security
**Created:** [August 30, 2019, 2:53pm UTC](https://discuss.elastic.co/t/can-i-set-built-in-users-passwords-in-elasticsearch-keystore/197540 "2019-08-30T14:53:36Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![JanKowalik](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jankowalik/32/55905_2.png) [@JanKowalik](https://discuss.elastic.co/u/JanKowalik)
#### Post date: [August 30, 2019, 2:53pm UTC](https://discuss.elastic.co/t/can-i-set-built-in-users-passwords-in-elasticsearch-keystore/197540/1 "2019-08-30T14:53:36Z")

</div>

Hi,

Is it possible to set built-in user passwords in elasticsearch-keystore before ES starts up?  
I know one can set the `bootstrap.password` in the keystore but what about passwords for elastic, kibana and other built-ins?

The Elastic Kubernetes Helm Chart seems to be doing the above here:

1. Creates a secret with elastic user credentials  
[https://github.com/elastic/helm-charts/blob/master/elasticsearch/examples/config/Makefile](https://github.com/elastic/helm-charts/blob/master/elasticsearch/examples/config/Makefile)
2. Adds it to the keystore  
[https://github.com/elastic/helm-charts/blob/1ad3826f26b4375b8935956d462f8777bd3c78a4/elasticsearch/templates/statefulset.yaml#L155](https://github.com/elastic/helm-charts/blob/1ad3826f26b4375b8935956d462f8777bd3c78a4/elasticsearch/templates/statefulset.yaml#L155)

I am not sure what keys and values are added there exactly, though.

My ElasticSearch version is 6.8.1

--  
Thanks in advance

---

<div class="post-metadata">

### Author: ![ikakavas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ikakavas/32/34430_2.png) [@ikakavas](https://discuss.elastic.co/u/ikakavas)
#### Post date: [September 6, 2019, 2:28pm UTC](https://discuss.elastic.co/t/can-i-set-built-in-users-passwords-in-elasticsearch-keystore/197540/2 "2019-09-06T14:28:10Z")

</div>

Hi,

As you have read in [our docs](https://www.elastic.co/guide/en/elastic-stack-overview/6.8/built-in-users.html) you can only set `bootstrap.password` in the elasticsearch keystore and this password only applies to the `elastic` user. Now that you can authenticate as `elastic` with the value of `bootstrap.password` as the password, you can use the [change passwords API](https://www.elastic.co/guide/en/elasticsearch/reference/6.8/security-api-change-password.html) to set the password for the rest of the built-in users.

Hope this helps!

---

<div class="post-metadata">

### Author: ![JanKowalik](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jankowalik/32/55905_2.png) [@JanKowalik](https://discuss.elastic.co/u/JanKowalik)
#### Post date: [September 6, 2019, 2:54pm UTC](https://discuss.elastic.co/t/can-i-set-built-in-users-passwords-in-elasticsearch-keystore/197540/3 "2019-09-06T14:54:26Z")

</div>

Thank you for your response.  
Yeah, I looked through the docs, but I just thought I might have missed something obvious. I have used the approach you described now.

Kind regards.

---

<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: [October 4, 2019, 2:54pm UTC](https://discuss.elastic.co/t/can-i-set-built-in-users-passwords-in-elasticsearch-keystore/197540/4 "2019-10-04T14:54:37Z")

</div>

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