Overview

It can happen that you forgot all of your passwords, or that you just couldn't copy them from the shell, because shell hated you so much and the screen unexpectedly closed (my case :D ) So in such case, you have to reset the password. You have 2 choices:

Delete all indexes and re-create the passwords

Add new super user and change it yourself.

Let's start with the first one :)

Delete all indexes

This is a good way if you want to start a new. Completely empty database with completely new passwords. That will still require to add new user though. So first stop your elasticsearch:

Stop Elasticsearch and add new user

This will add user called my_admin with role of superuser. After that, start your elasticsearch and delete all indexes:

Start Elasticsearch and delete all indexes

Congrats, all your indexes are deleted. Take whatever is in the fridge and run from the office :) Once all this is done, we can just re-create the keys as before:

Recreate keys

Change the password

Instead of this, we can simply change the password for the elastic user :) as follows:

Change Password