# I cannot log in to Elastic Enterprise Search

**URL:** <https://discuss.elastic.co/t/i-cannot-log-in-to-elastic-enterprise-search/274011>\
**Category:** Elastic Search\
**Created:** [May 26, 2021, 6:04am UTC](https://discuss.elastic.co/t/i-cannot-log-in-to-elastic-enterprise-search/274011 "2021-05-26T06:04:23Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![its-ogawa](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/its-ogawa/32/120829_2.png) [@its-ogawa](https://discuss.elastic.co/u/its-ogawa)\
**Post date:** [May 26, 2021, 6:04am UTC](https://discuss.elastic.co/t/i-cannot-log-in-to-elastic-enterprise-search/274011/1 "2021-05-26T06:04:23Z")

</div>

Elastic Enterprise Search has been installed.

After executing the following command, I was able to see the login screen from a browser.  
`ENT_SEARCH_DEFAULT_PASSWORD=[REDACTED] bin/enterprise-search`.

Even if I enter the Username and Password, the following message appears and I cannot login.  
`Username or password is incorrect`.

Username is the one configured in `enterprise-search.yml`, for example  
`elasticsearch.username: elastic`.

Password is the one you specified at runtime, for example  
`[REDACTED]`?  
Isn't it?

How can I be sure of these?

---

<div class="post-metadata">

**Author:** ![its-ogawa](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/its-ogawa/32/120829_2.png) [@its-ogawa](https://discuss.elastic.co/u/its-ogawa)\
**Post date:** [May 26, 2021, 10:34am UTC](https://discuss.elastic.co/t/i-cannot-log-in-to-elastic-enterprise-search/274011/2 "2021-05-26T10:34:39Z")

</div>

When you run the command, you will get the following message.

```auto
#########################################################

Success! Elastic Enterprise Search is starting successfully.

In a few moments, you'll be able to login at the following address:

* URL: http://XXX.XXX.XXX.XXX:3002
  * If this is your first time starting Enterprise Search, check the console output above for your user authentication credentials.
  * Visit the documentation: https://www.elastic.co/guide/en/enterprise-search

Secret session key has been generated.

Set the key in your config file to persist user sessions through process restarts:

secret_session_key: [REDACTED]

#########################################################

```

However, what should I do if I no longer see authentication credentials?

---

<div class="post-metadata">

**Author:** ![ross.bell](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ross.bell/32/77559_2.png) [@ross.bell](https://discuss.elastic.co/u/ross.bell)\
**Post date:** [May 26, 2021, 2:12pm UTC](https://discuss.elastic.co/t/i-cannot-log-in-to-elastic-enterprise-search/274011/3 "2021-05-26T14:12:44Z")

</div>

Hey @its-ogawa,

I'm assuming this is a self hosted deploy, and I'm also assuming you're using [standard](https://www.elastic.co/guide/en/workplace-search/current/workplace-search-security.html#standard) auth.

The `ENT_SEARCH_DEFAULT_PASSWORD` parameter will only work on the first successful boot sequence, after which it is ignored.

If you missed the generated password displayed in the log output during the first successful boot sequence, you can [force an auth reset](https://www.elastic.co/guide/en/workplace-search/current/workplace-search-install.html#installation-password-reset) by running `bin/enterprise-search --reset-auth`.

Let me know if that helps!

Ross

---

<div class="post-metadata">

**Author:** ![its-ogawa](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/its-ogawa/32/120829_2.png) [@its-ogawa](https://discuss.elastic.co/u/its-ogawa)\
**Post date:** [May 27, 2021, 12:59am UTC](https://discuss.elastic.co/t/i-cannot-log-in-to-elastic-enterprise-search/274011/4 "2021-05-27T00:59:43Z")

</div>

アドバイスをありがとうございます。

認証をリセットしてみました。  
以下のメッセージが表示されることを確認しました。

```auto
$ bin/enterprise-search --reset-auth
... snip ..
***User credentials have been reset! username: enterprise_search, password: [REDACTED]***

```

Next, we ran the following command again to confirm that enterprise search was started.

```auto
$ ENT_SEARCH_DEFAULT_PASSWORD=[REDACTED] bin/enterprise-search
... snip ...

```

However, I am unable to log in as well.

Will I be issued a new password in this case?  
I don't see any such message.

---

<div class="post-metadata">

**Author:** ![its-ogawa](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/its-ogawa/32/120829_2.png) [@its-ogawa](https://discuss.elastic.co/u/its-ogawa)\
**Post date:** [May 27, 2021, 2:02am UTC](https://discuss.elastic.co/t/i-cannot-log-in-to-elastic-enterprise-search/274011/5 "2021-05-27T02:02:08Z")

</div>

I am trying the following procedure.

> **[Installing Workplace Search | Workplace Search Guide \[7.13\] | Elastic](https://www.elastic.co/guide/en/workplace-search/current/workplace-search-install.html#installation-self-managed)**

---

<div class="post-metadata">

**Author:** ![its-ogawa](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/its-ogawa/32/120829_2.png) [@its-ogawa](https://discuss.elastic.co/u/its-ogawa)\
**Post date:** [May 27, 2021, 2:59am UTC](https://discuss.elastic.co/t/i-cannot-log-in-to-elastic-enterprise-search/274011/6 "2021-05-27T02:59:25Z")

</div>

I checked the documentation for elasticsearch.

I found that `.ent-search-actastic-users_v5` contains the value "enterprise\_search" as `elasticsearch_username`.  
This is the username required for login, right?

On the other hand, I think the equivalent of password is `encrypted_password`, but the value is empty.

Where did the password go?

---

<div class="post-metadata">

**Author:** ![its-ogawa](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/its-ogawa/32/120829_2.png) [@its-ogawa](https://discuss.elastic.co/u/its-ogawa)\
**Post date:** [May 27, 2021, 9:40am UTC](https://discuss.elastic.co/t/i-cannot-log-in-to-elastic-enterprise-search/274011/7 "2021-05-27T09:40:04Z")

</div>

@ross.bell  
You're right.

Ah. I may have simply not been able to reload.  
I was able to log in with the following steps.

```auto
$ bin/enterprise-search --reset-auth
... snip ..
***User credentials have been reset! username: enterprise_search, password:**************** ***

$ ENT_SEARCH_DEFAULT_PASSWORD=[your_password] bin/enterprise-search
... snip ...
Success! Elastic Enterprise Search is starting successfully.

In a few moments, you'll be able to login at the following address:

* URL: http://XXX.XXX.XXX.XXX:3002
... snip ...

```

When you see the above message, go to [http://XXX.XXX.XXX.XXX:3002](http://XXX.XXX.XXX.XXX:3002).  
Set the following authentication information.

```auto
Username: enterprise_search
Password: [your_password]

```

Password is the `ENT_SEARCH_DEFAULT_PASSWORD` you specified when you started the enterprise search.

Note that if you have left the login page of [http://XXX.XXX.XXX.XXX:3002](http://XXX.XXX.XXX.XXX:3002) open, you will need to reload it.

---

<div class="post-metadata">

**Author:** ![ross.bell](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ross.bell/32/77559_2.png) [@ross.bell](https://discuss.elastic.co/u/ross.bell)\
**Post date:** [May 27, 2021, 4:18pm UTC](https://discuss.elastic.co/t/i-cannot-log-in-to-elastic-enterprise-search/274011/8 "2021-05-27T16:18:15Z")

</div>

Hey @its-ogawa,

It sounds like you were eventually able to log in? There is a known issue where sometimes you have to refresh the login screen after restarting an Enterprise Search cluster.

I would recommend editing/redacting your responses that include passwords just to be safe.

Ross

---

<div class="post-metadata">

**Author:** ![its-ogawa](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/its-ogawa/32/120829_2.png) [@its-ogawa](https://discuss.elastic.co/u/its-ogawa)\
**Post date:** [May 28, 2021, 2:33am UTC](https://discuss.elastic.co/t/i-cannot-log-in-to-elastic-enterprise-search/274011/9 "2021-05-28T02:33:26Z")

</div>

Even though this is a sample, it was unintentional to include the password. Sorry about that.

The most recent answer could be edited, but the topic content and the answer in progress could no longer be edited.  
If it is inappropriate, I will delete the entire topic.

---

<div class="post-metadata">

**Author:** ![ross.bell](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ross.bell/32/77559_2.png) [@ross.bell](https://discuss.elastic.co/u/ross.bell)\
**Post date:** [May 28, 2021, 3:08pm UTC](https://discuss.elastic.co/t/i-cannot-log-in-to-elastic-enterprise-search/274011/10 "2021-05-28T15:08:33Z")

</div>

No worries, it looks like I was able to go back and edit out any passwords. Glad we got this figured out!

---

<div class="post-metadata">

**Author:** ![its-ogawa](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/its-ogawa/32/120829_2.png) [@its-ogawa](https://discuss.elastic.co/u/its-ogawa)\
**Post date:** [May 31, 2021, 2:25am UTC](https://discuss.elastic.co/t/i-cannot-log-in-to-elastic-enterprise-search/274011/11 "2021-05-31T02:25:10Z")

</div>

Thank you for your help.

Now I can publish with ease.

I hope this topic will also be useful for newbies to EnterpriseSearch.

---

<div class="post-metadata">

**Author:** ![its-ogawa](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/its-ogawa/32/120829_2.png) [@its-ogawa](https://discuss.elastic.co/u/its-ogawa)\
**Post date:** [June 7, 2021, 9:00am UTC](https://discuss.elastic.co/t/i-cannot-log-in-to-elastic-enterprise-search/274011/12 "2021-06-07T09:00:35Z")

</div>

Sorry to ask again on a topic that has been closed once.

Could you please elaborate on how to do the following.

> There is a known issue where sometimes you have to refresh the login screen after restarting an Enterprise Search cluster.

I reset the auth password again, then specified `ENT_SEARCH_DEFAULT_PASSWORD` and started EnterpriseSearch.  
However, I cannot login with the specified password.  
I have tried reloading the browser and running it against a newly launched browser, but it does not work.

I have repeated this method several times, but it seems that the password displayed when resetting is a random string, different from the one specified in `ENT_SEARCH_DEFAULT_PASSWORD`.

The following command doesn't seem to be working, is there a requirement for it to work?

```auto
$ ENT_SEARCH_DEFAULT_PASSWORD=[your_password] bin/enterprise-search

```

---

<div class="post-metadata">

**Author:** ![its-ogawa](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/its-ogawa/32/120829_2.png) [@its-ogawa](https://discuss.elastic.co/u/its-ogawa)\
**Post date:** [June 7, 2021, 9:05am UTC](https://discuss.elastic.co/t/i-cannot-log-in-to-elastic-enterprise-search/274011/13 "2021-06-07T09:05:35Z")

</div>

For example, execute the following commands in rapid succession

```auto
$ ENT_SEARCH_DEFAULT_PASSWORD=[your_password] bin/enterprise-search
... snip ...

```

```auto
$ bin/enterprise-search --reset-auth
... snip ...
This operation will reset the password of the default user: enterprise_search.
Please confirm that you would like to continue [y/N]:y
***User credentials have been reset! username: enterprise_search, password: [this_is_password]***

```

The password is expected to be [your\_password], but a completely different [this\_is\_password] is displayed.

---

<div class="post-metadata">

**Author:** ![ross.bell](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ross.bell/32/77559_2.png) [@ross.bell](https://discuss.elastic.co/u/ross.bell)\
**Post date:** [June 7, 2021, 2:29pm UTC](https://discuss.elastic.co/t/i-cannot-log-in-to-elastic-enterprise-search/274011/14 "2021-06-07T14:29:17Z")

</div>

Keep the `ENT_SEARCH_DEFAULT_PASSWORD` set when you run the `--reset-auth` command:

```auto
ENT_SEARCH_DEFAULT_PASSWORD=[your_password] bin/enterprise-search --reset-auth

```

---

<div class="post-metadata">

**Author:** ![its-ogawa](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/its-ogawa/32/120829_2.png) [@its-ogawa](https://discuss.elastic.co/u/its-ogawa)\
**Post date:** [June 9, 2021, 10:19am UTC](https://discuss.elastic.co/t/i-cannot-log-in-to-elastic-enterprise-search/274011/15 "2021-06-09T10:19:08Z")

</div>

> [@ross.bell](#):
>
> Keep the `ENT_SEARCH_DEFAULT_PASSWORD` set when you run the `--reset-auth` command:
> 
> ```auto
> ENT_SEARCH_DEFAULT_PASSWORD=[your_password] bin/enterprise-search --reset-auth
> 
> ```

Thank you for your repeated instructions.  
I was able to reset it with that command.  
It was very helpful.

Now I have a couple of questions.

If I don't know the password issued by EnterpriseSearch and I want to reset it, isn't it difficult to specify the value of `ENT_SEARCH_DEFAULT_PASSWORD`?  
In fact, if you have the wrong value for `ENT_SEARCH_DEFAULT_PASSWORD`, you could not reset it.

Or is it wrong to use this command when I want to reset my password?  
Is there a better way?

---

<div class="post-metadata">

**Author:** ![ross.bell](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ross.bell/32/77559_2.png) [@ross.bell](https://discuss.elastic.co/u/ross.bell)\
**Post date:** [June 14, 2021, 2:54pm UTC](https://discuss.elastic.co/t/i-cannot-log-in-to-elastic-enterprise-search/274011/16 "2021-06-14T14:54:00Z")

</div>

I wonder if we're confusing resetting the admin password and resetting a normal user's password. You shouldn't need to know any prior value of `ENT_SEARCH_DEFAULT_PASSWORD` in order to run the `--reset-auth` command.

---

<div class="post-metadata">

**Author:** ![its-ogawa](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/its-ogawa/32/120829_2.png) [@its-ogawa](https://discuss.elastic.co/u/its-ogawa)\
**Post date:** [June 14, 2021, 3:00pm UTC](https://discuss.elastic.co/t/i-cannot-log-in-to-elastic-enterprise-search/274011/17 "2021-06-14T15:00:23Z")

</div>

I would like to know the correct way to reset the admin password.

Is it the following command?

```auto
# ENT_SEARCH_DEFAULT_PASSWORD=[your_password] bin/enterprise-search --reset-auth

```

Is it necessary to specify either `ENT_SEARCH_DEFAULT_PASSWORD` or `--reset-auth`?

---

<div class="post-metadata">

**Author:** ![ross.bell](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ross.bell/32/77559_2.png) [@ross.bell](https://discuss.elastic.co/u/ross.bell)\
**Post date:** [June 14, 2021, 3:28pm UTC](https://discuss.elastic.co/t/i-cannot-log-in-to-elastic-enterprise-search/274011/18 "2021-06-14T15:28:24Z")

</div>

What you've posted is the correct way to reset the admin password:

```auto
ENT_SEARCH_DEFAULT_PASSWORD=[your_password] bin/enterprise-search --reset-auth

```

You must specify `--reset-auth` in order to trigger the reset command. If you don't specify a `ENT_SEARCH_DEFAULT_PASSWORD` environment variable, a random password will be generated and displayed when running the command.

---

<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:** [November 4, 2022, 8:30am UTC](https://discuss.elastic.co/t/i-cannot-log-in-to-elastic-enterprise-search/274011/19 "2022-11-04T08:30:53Z")

</div>


