# Getting Auto Password When Setting up Elasticsearch

**URL:** https://discuss.elastic.co/t/getting-auto-password-when-setting-up-elasticsearch/118746
**Category:** Elasticsearch
**Created:** [February 7, 2018, 4:23am UTC](https://discuss.elastic.co/t/getting-auto-password-when-setting-up-elasticsearch/118746 "2018-02-07T04:23:16Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![danlevy](https://avatars.discourse-cdn.com/v4/letter/d/b19c9b/32.png) [@danlevy](https://discuss.elastic.co/u/danlevy)
#### Post date: [February 7, 2018, 4:23am UTC](https://discuss.elastic.co/t/getting-auto-password-when-setting-up-elasticsearch/118746/1 "2018-02-07T04:23:16Z")

</div>

I am trying to run elasticsearch using the instructions [here](https://www.elastic.co/start). I call `bin/elasticsearch-plugin install x-pack` and everything goes smoothly. I then call `bin/elasticsearch`. When I go to [http://localhost:9200](http://localhost:9200), it prompts me for a username and a password (like it should). However, in terminal (I am using a Mac), I never get a success message. It seems like elasticsearch continues to run. If I then run `bin/x-pack/setup-passwords auto`and nothing happens. Terminal prints out this line last: `[2018-02-06T23:16:59,127][INFO][o.e.c.r.a.AllocationService] [wMwUnP5] Cluster health status changed from [RED] to [GREEN] (reason: [shards started [[.watcher-history-7-2018.02.06][0]] ...]).` and then continues running but does not print anything out. How should I proceed to get the password to print out?

---

<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: [February 7, 2018, 7:27am UTC](https://discuss.elastic.co/t/getting-auto-password-when-setting-up-elasticsearch/118746/2 "2018-02-07T07:27:43Z")

</div>

You'll need to run `bin/x-pack/setup-passwords auto` in a different terminal window/tab than the one you run `bin/elasticsearch` from. The reason is that `setup-passwords` script needs to connect to the existing Elasticsearch instance to actually setup the passwords. So

1. Open a terminal and run `bin/elasticsearch`. Leave it running there
2. Open a new terminal tab/window and run `bin/x-pack/setup-passwords auto` . Note the passwords that will be generated for the internal users and continue with the instructions from there.

---

<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 7, 2018, 7:28am UTC](https://discuss.elastic.co/t/getting-auto-password-when-setting-up-elasticsearch/118746/3 "2018-03-07T07:28:06Z")

</div>

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