# How to set passwords for built-in users in batch mode?

**URL:** <https://discuss.elastic.co/t/how-to-set-passwords-for-built-in-users-in-batch-mode/119655>\
**Category:** Elasticsearch\
**Created:** [February 13, 2018, 2:18pm UTC](https://discuss.elastic.co/t/how-to-set-passwords-for-built-in-users-in-batch-mode/119655 "2018-02-13T14:18:23Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![TimV](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/timv/32/13162_2.png) [@TimV](https://discuss.elastic.co/u/TimV)\
**Post date:** [February 19, 2018, 1:02am UTC](https://discuss.elastic.co/t/how-to-set-passwords-for-built-in-users-in-batch-mode/119655/6 "2018-02-19T01:02:59Z")

</div>

@Vitaly_il

> how I may submit bootstrapping password to \_xpack/security/user/.../\_password API

Step 0: Think of a password to use. I'll use "top-secret"

Step 1: Shutdown at least 1 node of your cluster.

Step 2: Add a "bootstrap.password" to the keystore on that node:

```auto
bin/elasticsearch-keystore add "bootstrap.password"
Enter value for bootstrap.password: top-secret

```

Step 3: Start that elasticsearch node.

Step 4: Call

```auto
curl -uelastic -XPUT -H 'Content-Type: application/json' 'http://localhost:9200/_xpack/security/user/kibana/_password' -d '{ "password":new-kibana-password" }'
Enter host password for user 'elastic': top-secret

```

Step 5: Repeat (4) for logstash\_system

Step 6: Repeat (4) for elastic (to set a permanent password rather than just a "bootstrap.password" that's tied to a specific node)

---

_[View the full topic](https://discuss.elastic.co/t/how-to-set-passwords-for-built-in-users-in-batch-mode/119655)._
