# Elasticsearch-setup-passwords auto -url "http://localhost:9200" i want to run this command but getting error

**URL:** <https://discuss.elastic.co/t/elasticsearch-setup-passwords-auto-url-http-localhost-9200-i-want-to-run-this-command-but-getting-error/352920>\
**Category:** Elasticsearch\
**Created:** [February 9, 2024, 10:48am UTC](https://discuss.elastic.co/t/elasticsearch-setup-passwords-auto-url-http-localhost-9200-i-want-to-run-this-command-but-getting-error/352920 "2024-02-09T10:48:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Karan37](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/karan37/32/131451_2.png) [@Karan37](https://discuss.elastic.co/u/Karan37)\
**Post date:** [February 9, 2024, 10:48am UTC](https://discuss.elastic.co/t/elasticsearch-setup-passwords-auto-url-http-localhost-9200-i-want-to-run-this-command-but-getting-error/352920/1 "2024-02-09T10:48:05Z")

</div>

while running this command in the elasticsearch bin folder cli

```auto
elasticsearch-setup-passwords auto -url "http://localhost:9200"

```

it is giving this error

```auto
Failed to authenticate user 'elastic' against http://localhost: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 C:\Elastic Stack\elasticsearch-8.12.0\config\elasticsearch.keystore

You can use the `elasticsearch-reset-password` CLI tool to reset the password of the 'elastic' user

ERROR: Failed to verify bootstrap password, with exit code 78

```

i tried changing the password of the elastic which is a built-in superuser  
with this command

```auto
elasticsearch-reset-password -u elastic

```

password of user elastic is reseting successfully , then i use this command

```auto
elasticsearch-keystore add 'bootstrap.password'

```

to explicitly change the password in keystore but this is also giving error

```auto
ERROR: Setting name ['bootstrap.password'] does not match the allowed setting name pattern [[A-Za-z0-9_\-.]+], with exit code 65

```

i tried with the easiest password also but no luck its not getting updated

additional information:  
while running this command

```auto
elasticsearch-users list

```

its giving

```auto
No users found

```

but i have a user named elastic with is super user i also tried that with the api calll

 ![Screenshot 2024-02-09 161420](https://us1.discourse-cdn.com/elastic/original/3X/8/9/89d319bb1bc78eaa4cf1dfa84251c0762c2615b3.png)

also i am getting this log in the elasticsearch CLI

```auto
[2024-02-09T16:13:27,590][INFO][o.e.x.s.a.RealmsAuthenticator] [LAPTOP-58N3JBV9] Authentication of [elastic] was terminated by realm [reserved] - failed to authenticate user [elastic]

```

any help would be apperciated

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [February 11, 2024, 9:08pm UTC](https://discuss.elastic.co/t/elasticsearch-setup-passwords-auto-url-http-localhost-9200-i-want-to-run-this-command-but-getting-error/352920/2 "2024-02-11T21:08:49Z")

</div>

@Karan37

What version elasticsearch?

How did you install?

What documentation did you follow?

Please share formatted elasticsearch.yml

What are you trying to accomplish?

Why are you trying to set the bootstrap password.. it is only initially used see [here](https://www.elastic.co/guide/en/elasticsearch/reference/current/built-in-users.html#bootstrap-elastic-passwords) you don't need it after setup is done

After you ran reset password just try to curl with that user `elastic` and your new password.

---

<div class="post-metadata">

**Author:** ![Karan37](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/karan37/32/131451_2.png) [@Karan37](https://discuss.elastic.co/u/Karan37)\
**Post date:** [February 12, 2024, 9:07am UTC](https://discuss.elastic.co/t/elasticsearch-setup-passwords-auto-url-http-localhost-9200-i-want-to-run-this-command-but-getting-error/352920/3 "2024-02-12T09:07:51Z")

</div>

> [@stephenb](#):
>
> What are you trying to accomplish?

i was just trying to understand and accomplish additional security

> [@stephenb](#):
>
> Why are you trying to set the bootstrap password.. it is only initially used see [here](https://www.elastic.co/guide/en/elasticsearch/reference/current/built-in-users.html#bootstrap-elastic-passwords) you don't need it after setup is done

ohh, now i understand through the documentation i don't need to setup the passwords again

I'm impressed by the community's strength and support. I plan to contribute once I gain more expertise. Thanks sir for the great help

---

<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:** [March 11, 2024, 9:08am UTC](https://discuss.elastic.co/t/elasticsearch-setup-passwords-auto-url-http-localhost-9200-i-want-to-run-this-command-but-getting-error/352920/4 "2024-03-11T09:08:11Z")

</div>

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