# Locked myself out of my superuser role by accident, how do I get access back?

**URL:** https://discuss.elastic.co/t/locked-myself-out-of-my-superuser-role-by-accident-how-do-i-get-access-back/303977
**Category:** Kibana
**Tags:** elastic-stack-security
**Created:** [May 4, 2022, 9:58pm UTC](https://discuss.elastic.co/t/locked-myself-out-of-my-superuser-role-by-accident-how-do-i-get-access-back/303977 "2022-05-04T21:58:15Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![pritster5](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pritster5/32/103311_2.png) [@pritster5](https://discuss.elastic.co/u/pritster5)
#### Post date: [May 4, 2022, 9:58pm UTC](https://discuss.elastic.co/t/locked-myself-out-of-my-superuser-role-by-accident-how-do-i-get-access-back/303977/1 "2022-05-04T21:58:16Z")

</div>

Being the idiot I am, I had a use case where I needed to make two accounts for myself, one with admin access and one with regular access.

Instead of making the new admin account BEFORE I demoted my current account to the regular level, I demoted my account (changed my role from superuser to another, less privileged role) first.

This obviously caused me to lose access to the User controls as I was no longer an admin.

How can I get access back?

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [May 4, 2022, 10:47pm UTC](https://discuss.elastic.co/t/locked-myself-out-of-my-superuser-role-by-accident-how-do-i-get-access-back/303977/2 "2022-05-04T22:47:10Z")

</div>

Does [Setting passwords for native and built-in users | Elasticsearch Guide [8.2] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/8.2/change-passwords-native-users.html) help?

---

<div class="post-metadata">

### Author: ![pritster5](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pritster5/32/103311_2.png) [@pritster5](https://discuss.elastic.co/u/pritster5)
#### Post date: [May 5, 2022, 5:34pm UTC](https://discuss.elastic.co/t/locked-myself-out-of-my-superuser-role-by-accident-how-do-i-get-access-back/303977/3 "2022-05-05T17:34:06Z")

</div>

I'll give it a try, although I should mention I'm on ELK 7.5 (since I'm using an old plugin that relies on that).

---

<div class="post-metadata">

### Author: ![pritster5](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pritster5/32/103311_2.png) [@pritster5](https://discuss.elastic.co/u/pritster5)
#### Post date: [May 5, 2022, 6:44pm UTC](https://discuss.elastic.co/t/locked-myself-out-of-my-superuser-role-by-accident-how-do-i-get-access-back/303977/4 "2022-05-05T18:44:32Z")

</div>

Actually I just realized that doesn't help with my issue because the issue is not logging in to Kibana, but that my user doesn't have enough permissions in it's role.

I need to be able to attach the superuser role to my user again.

---

<div class="post-metadata">

### Author: ![Yang\_Wang](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yang_wang/32/48857_2.png) [@Yang\_Wang](https://discuss.elastic.co/u/Yang_Wang)
#### Post date: [May 6, 2022, 12:36am UTC](https://discuss.elastic.co/t/locked-myself-out-of-my-superuser-role-by-accident-how-do-i-get-access-back/303977/5 "2022-05-06T00:36:52Z")

</div>

You can create a superuser in the file realm and then use this user to grant more privileges to your other user. Follow this [documentation](https://www.elastic.co/guide/en/elasticsearch/reference/7.5/file-realm.html) to configure a file realm user. Depending on your existing configuration, you may need restart the Elasticsearch node.

---

<div class="post-metadata">

### Author: ![pritster5](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pritster5/32/103311_2.png) [@pritster5](https://discuss.elastic.co/u/pritster5)
#### Post date: [May 6, 2022, 10:50pm UTC](https://discuss.elastic.co/t/locked-myself-out-of-my-superuser-role-by-accident-how-do-i-get-access-back/303977/6 "2022-05-06T22:50:20Z")

</div>

Worked perfectly, thank you!

---

<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: [June 3, 2022, 10:50pm UTC](https://discuss.elastic.co/t/locked-myself-out-of-my-superuser-role-by-accident-how-do-i-get-access-back/303977/7 "2022-06-03T22:50:48Z")

</div>

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