# Dec 22nd, 2017: \[EN\]\[X-Pack\] I lost/forgot the "elastic" user password! Am I locked out forever?

**URL:** https://discuss.elastic.co/t/dec-22nd-2017-en-x-pack-i-lost-forgot-the-elastic-user-password-am-i-locked-out-forever/110075
**Category:** Advent Calendar
**Created:** [December 22, 2017, 12:00am UTC](https://discuss.elastic.co/t/dec-22nd-2017-en-x-pack-i-lost-forgot-the-elastic-user-password-am-i-locked-out-forever/110075 "2017-12-22T00:00:03Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![thiago](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thiago/32/32096_2.png) [@thiago](https://discuss.elastic.co/u/thiago)
#### Post date: [December 22, 2017, 12:00am UTC](https://discuss.elastic.co/t/dec-22nd-2017-en-x-pack-i-lost-forgot-the-elastic-user-password-am-i-locked-out-forever/110075/1 "2017-12-22T00:00:03Z")

</div>

**Situation** : You are using X-Pack Security and you lost/forgot the "elastic" superuser password.

**Don't panic!**

You can workaround this problem by adding a temporary superuser user:

1. Provision a new coordinating-only node with [File Realm](https://www.elastic.co/guide/en/x-pack/current/file-realm.html) enabled.
2. Add a new temporary superuser user:

```bash
$ bin/x-pack/users useradd tempuser -r superuser

```

1. Start the temporary node and wait until it successfully joins the cluster.
2. Reset the "elastic" user password (using the new tempuser):

```bash
$ curl -XPUT -u tempuser:<password> https://localhost:9200/_xpack/security/user/elastic/_password -H "Content-Type: application/json" -d '
{
  "password": "MyN3wC00lP4ssw0rd"
}'

```

1. Check that is working with:

```bash
$ curl -u elastic:MyN3wC00lP4ssw0rd https://localhost:9200/

```

1. Stop and **scrap away** the temporary node. This is **very important** because this node contains the temporary user in it's local file realm.

---

<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: [August 23, 2018, 8:31am UTC](https://discuss.elastic.co/t/dec-22nd-2017-en-x-pack-i-lost-forgot-the-elastic-user-password-am-i-locked-out-forever/110075/2 "2018-08-23T08:31:21Z")

</div>


