# X-Pack Kibana failed to authenticate user

**URL:** <https://discuss.elastic.co/t/x-pack-kibana-failed-to-authenticate-user/117193>\
**Category:** Kibana\
**Created:** [January 26, 2018, 1:01pm UTC](https://discuss.elastic.co/t/x-pack-kibana-failed-to-authenticate-user/117193 "2018-01-26T13:01:42Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![gunesg](https://avatars.discourse-cdn.com/v4/letter/g/258eb7/32.png) [@gunesg](https://discuss.elastic.co/u/gunesg)\
**Post date:** [January 26, 2018, 1:01pm UTC](https://discuss.elastic.co/t/x-pack-kibana-failed-to-authenticate-user/117193/1 "2018-01-26T13:01:42Z")

</div>

Hello, i installed elasticsearch a few days ago.  
First i installed elasticsearch, then kibana and x-pack for both. I also changed the elasticsearch.username in kibana.yml. I hope that someone can help me. It worked without x-pack, but now i can only start elastic.

Kibana :  
log [13:10:36.001] [error][status][plugin:tilemap@6.1.2] Status changed from red to red - [security\_exception] failed to authenticate user [kibana], with { header={ WWW-Authenticate="Basic realm="security" charset="UTF-8"" } }

log [13:11:36.235] [warning][license][xpack] License information from the X-Pack plugin could not be obtained from Elasticsearch for the [data] cluster. [security\_exception] failed to authenticate user [kibana], with { header={ WWW-Authenticate="Basic realm="security" charset="UTF-8"" } } :: {"path":"/\_xpack","statusCode":401,"response":"{"error":{"root\_cause":[{"type":"security\_exception","reason":"failed to authenticate user [kibana]","header":{"WWW-Authenticate":"Basic realm=\"security\" charset=\"UTF-8\""}}],"type":"security\_exception","reason":"failed to authenticate user [kibana]","header":{"WWW-Authenticate":"Basic realm=\"security\" charset=\"UTF-8\""}},"status":401}","wwwAuthenticateDirective":"Basic realm="security" charset="UTF-8""}

 ![b](https://us1.discourse-cdn.com/elastic/original/3X/5/a/5ae6c5678f6eed245817f0fe4a8c148fe3a08b1d.png) ![a](https://us1.discourse-cdn.com/elastic/original/3X/a/0/a0a45d74fbc14d6edc3f0553755c47dd72d68e3b.png)

---

<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:** [January 26, 2018, 7:05pm UTC](https://discuss.elastic.co/t/x-pack-kibana-failed-to-authenticate-user/117193/2 "2018-01-26T19:05:56Z")

</div>

Hi,

- Did you restart Elasticsearch after installing X-Pack ?
- Did you set the passwords for the built-in users as described in [the docs](https://www.elastic.co/guide/en/x-pack/current/setting-up-authentication.html#set-built-in-user-passwords) ?
- You mention `elasticsearch.username` but did you also set the `elasticsearch.password` in `kibana.yml` ? ( Assuming you have completed the aforementioned step after installing X-Pack )

---

<div class="post-metadata">

**Author:** ![gunesg](https://avatars.discourse-cdn.com/v4/letter/g/258eb7/32.png) [@gunesg](https://discuss.elastic.co/u/gunesg)\
**Post date:** [January 27, 2018, 4:53pm UTC](https://discuss.elastic.co/t/x-pack-kibana-failed-to-authenticate-user/117193/3 "2018-01-27T16:53:34Z")

</div>

Hi, i set the passwords and i also set the username and password in kibana.yml, but it still doesn't work. 😕

---

<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:** [January 29, 2018, 10:00am UTC](https://discuss.elastic.co/t/x-pack-kibana-failed-to-authenticate-user/117193/4 "2018-01-29T10:00:45Z")

</div>

It sounds like that you are using the wrong password. Did you set the password yourself or did you get auto-generated passwords from `setup-passwords` ?

You can test the passwords you think are correct against elasticsearch manually by running

`curl -u <user_here> 'http://localhost:9200/_xpack/security/_authenticate?pretty'`

replacing `<user_here>` with the relevant username ( `elastic`, `kibana`, `logstash_system` ) and entering the appropriate password for each.

If you can't remember or are not sure which passwords were generated or what you have set, you can always reset the password of the builtin users manually using the instructions that @timv has shared in a [previous answer](https://discuss.elastic.co/t/i-lost-the-password-that-has-been-changed/91867/2)

---

<div class="post-metadata">

**Author:** ![gunesg](https://avatars.discourse-cdn.com/v4/letter/g/258eb7/32.png) [@gunesg](https://discuss.elastic.co/u/gunesg)\
**Post date:** [January 29, 2018, 11:58am UTC](https://discuss.elastic.co/t/x-pack-kibana-failed-to-authenticate-user/117193/5 "2018-01-29T11:58:12Z")

</div>

Thank you! It works now 🙂

---

<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:** [February 26, 2018, 11:58am UTC](https://discuss.elastic.co/t/x-pack-kibana-failed-to-authenticate-user/117193/6 "2018-02-26T11:58:33Z")

</div>

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