# Cannot set password for new user Kibana ECK 7.4.2

**URL:** https://discuss.elastic.co/t/cannot-set-password-for-new-user-kibana-eck-7-4-2/207437
**Category:** Kibana
**Created:** [November 12, 2019, 4:28am UTC](https://discuss.elastic.co/t/cannot-set-password-for-new-user-kibana-eck-7-4-2/207437 "2019-11-12T04:28:23Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![oaaraya](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/oaaraya/32/57509_2.png) [@oaaraya](https://discuss.elastic.co/u/oaaraya)
#### Post date: [November 12, 2019, 4:28am UTC](https://discuss.elastic.co/t/cannot-set-password-for-new-user-kibana-eck-7-4-2/207437/1 "2019-11-12T04:28:24Z")

</div>

Brand new cluster running on kubernetes ECK 7.4.2, open up Kibana log in as elastic user, create a new user, log out and cannot log in with wrong password.  
I've tried the obvious, deleted the user, changed the password to 123456, created another user with same password. No luck.

---

<div class="post-metadata">

### Author: ![cufflinks](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cufflinks/32/42129_2.png) [@cufflinks](https://discuss.elastic.co/u/cufflinks)
#### Post date: [November 13, 2019, 7:06am UTC](https://discuss.elastic.co/t/cannot-set-password-for-new-user-kibana-eck-7-4-2/207437/2 "2019-11-13T07:06:22Z")

</div>

Hi Oaaraya,

Can you let me know what roles (if any) you applied to the user?

---

<div class="post-metadata">

### Author: ![oaaraya](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/oaaraya/32/57509_2.png) [@oaaraya](https://discuss.elastic.co/u/oaaraya)
#### Post date: [November 13, 2019, 1:18pm UTC](https://discuss.elastic.co/t/cannot-set-password-for-new-user-kibana-eck-7-4-2/207437/3 "2019-11-13T13:18:55Z")

</div>

Superuser, so I did a fresh install and logged in as elastic could not set the password for my user. I also added several roles and created a role that has every permission for Kibana. No luck.

---

<div class="post-metadata">

### Author: ![cufflinks](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cufflinks/32/42129_2.png) [@cufflinks](https://discuss.elastic.co/u/cufflinks)
#### Post date: [November 13, 2019, 4:39pm UTC](https://discuss.elastic.co/t/cannot-set-password-for-new-user-kibana-eck-7-4-2/207437/4 "2019-11-13T16:39:37Z")

</div>

Did you add any roles that don't exist in Elasticsearch?

---

<div class="post-metadata">

### Author: ![oaaraya](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/oaaraya/32/57509_2.png) [@oaaraya](https://discuss.elastic.co/u/oaaraya)
#### Post date: [November 13, 2019, 4:49pm UTC](https://discuss.elastic.co/t/cannot-set-password-for-new-user-kibana-eck-7-4-2/207437/5 "2019-11-13T16:49:31Z")

</div>

I did to add all kibana permissions. Should I remove it? No other role has any kibana permissions, that seemed odd to me but I was running 7.4.0 with no issues so I just never really see the roles in detail, just assigning was always enough.

---

<div class="post-metadata">

### Author: ![cufflinks](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cufflinks/32/42129_2.png) [@cufflinks](https://discuss.elastic.co/u/cufflinks)
#### Post date: [November 13, 2019, 4:52pm UTC](https://discuss.elastic.co/t/cannot-set-password-for-new-user-kibana-eck-7-4-2/207437/6 "2019-11-13T16:52:15Z")

</div>

Let's just try it out without the roles and see if that is the issue. It might not be but I remember there was an issue around permissions that kept giving (invalid username and password) error even when it was for another reason.

---

<div class="post-metadata">

### Author: ![oaaraya](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/oaaraya/32/57509_2.png) [@oaaraya](https://discuss.elastic.co/u/oaaraya)
#### Post date: [November 13, 2019, 4:58pm UTC](https://discuss.elastic.co/t/cannot-set-password-for-new-user-kibana-eck-7-4-2/207437/7 "2019-11-13T16:58:33Z")

</div>

Tried that, even created a new user named test and password 123456. Same result. The only user I can log in with is elastic.

---

<div class="post-metadata">

### Author: ![cufflinks](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/cufflinks/32/42129_2.png) [@cufflinks](https://discuss.elastic.co/u/cufflinks)
#### Post date: [November 13, 2019, 6:15pm UTC](https://discuss.elastic.co/t/cannot-set-password-for-new-user-kibana-eck-7-4-2/207437/8 "2019-11-13T18:15:17Z")

</div>

Do you have any logs that we can look at? Or any stack trace when you try to login in?

---

<div class="post-metadata">

### Author: ![oaaraya](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/oaaraya/32/57509_2.png) [@oaaraya](https://discuss.elastic.co/u/oaaraya)
#### Post date: [November 13, 2019, 8:10pm UTC](https://discuss.elastic.co/t/cannot-set-password-for-new-user-kibana-eck-7-4-2/207437/9 "2019-11-13T20:10:18Z")

</div>

```
{"type":"response","@timestamp":"2019-11-13T16:43:02Z","tags":[],"pid":12,"method":"post","statusCode":401,"req":{"url":"/api/security/v1/login","method":"post","headers":{"host":"xxxx","content-length":"45","accept":"application/json, text/plain, */*","origin":"xxx","kbn-version":"7.4.2","user-agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.87 Safari/537.36","content-type":"application/json;charset=UTF-8","sec-fetch-site":"same-origin","sec-fetch-mode":"cors","referer":"https://xxxx/login?next=%2F","accept-encoding":"gzip, deflate, br","accept-language":"en-US,en;q=0.9,es;q=0.8","x-cloud-trace-context":"966f00dcd9b8a2dce514b192347402a8/6570964867542393934","via":"1.1 google","x-forwarded-for":"xxxxxx,"x-forwarded-proto":"https","connection":"Keep-Alive"},"remoteAddress":"10.150.15.201","userAgent":"10.150.15.201","referer":"https://xxx/login?next=%2F"},"res":{"statusCode":401,"responseTime":25,"contentLength":9},"message":"POST /api/security/v1/login 401 25ms - 9.0B"}

```

{"type":"response","@timestamp":"2019-11-13T16:43:08Z","tags":,"pid":12,"method":"get","statusCode":200,"req":{"url":"/login","method":"get","headers":{"host":"10.20.9.11:5601","user-agent":"kube-probe/1.14+","accept-encoding":"gzip","connection":"close"},"remoteAddress":"10.20.9.1","userAgent":"10.20.9.1"},"res":{"statusCode":200,"responseTime":16,"contentLength":9},"message":"GET /login 200 16ms - 9.0B"}

---

<div class="post-metadata">

### Author: ![oaaraya](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/oaaraya/32/57509_2.png) [@oaaraya](https://discuss.elastic.co/u/oaaraya)
#### Post date: [November 13, 2019, 8:39pm UTC](https://discuss.elastic.co/t/cannot-set-password-for-new-user-kibana-eck-7-4-2/207437/10 "2019-11-13T20:39:44Z")

</div>

I've tested further and I think is an elasticsearch authentication issue  
Created the user:  
curl -u elastic:$PASSWORD -k -X POST "[https://localhost:9200/\_security/user/test1?pretty](https://localhost:9200/_security/user/test1?pretty)" -H 'Content-Type: application/json' -d'  
{  
"password" : "123456",  
"roles" : ["superuser"],  
"full\_name" : "Jack Nicholson",  
"email" : "[jacknich@example.com](mailto:jacknich@example.com)",  
"metadata" : {  
"intelligence" : 7  
}  
}  
'  
Tested the user:  
curl -u "test1:123456" -k "[https://localhost:9200/\_cluster/health](https://localhost:9200/_cluster/health)"

{"error":{"root\_cause":[{"type":"security\_exception","reason":"unable to authenticate user [test1] for REST request [/\_cluster/health]","header":{"WWW-Authenticate":["Bearer realm="security"","ApiKey","Basic realm="security" charset="UTF-8""]}}],"type":"security\_exception","reason":"unable to authenticate user [test1] for REST request [/\_cluster/health]","header":{"WWW-Authenticate":["Bearer realm="security"","ApiKey","Basic realm="security" charset="UTF-8""]}},"status":401} **%**

---

<div class="post-metadata">

### Author: ![oaaraya](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/oaaraya/32/57509_2.png) [@oaaraya](https://discuss.elastic.co/u/oaaraya)
#### Post date: [November 13, 2019, 9:13pm UTC](https://discuss.elastic.co/t/cannot-set-password-for-new-user-kibana-eck-7-4-2/207437/11 "2019-11-13T21:13:49Z")

</div>

Found the solution here:

> [@New user can't login kibana](https://discuss.elastic.co/t/new-user-cant-login-kibana/204810):
>
> I setup eck and login by default "elastic" account successfully.But I or logstash can't login by new account created in kibana. {"statusCode":401,"error":"Unauthorized","message":"[security\_exception] unable to authenticate user [gmt-log-logstash] for REST request [/\_security/\_authenticate], with { header={ WWW-Authenticate={ 0="Bearer realm=\"security\"" & 1="ApiKey" & 2="Basic realm=\"security\" charset=\"UTF-8\"" } } }"}

There is a bug and the realm is not set for ECK

---

<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: [December 11, 2019, 9:13pm UTC](https://discuss.elastic.co/t/cannot-set-password-for-new-user-kibana-eck-7-4-2/207437/12 "2019-12-11T21:13:49Z")

</div>

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