I ran elasticsearch-setup-passwords to add "security" to my little ELK stack.
But 2 months later I could not log in, I did not write the passwords down -
and the username and password sets were not stored in the configs like i thought they were .
Instead of turning security off or starting over I found a better way to "recover" my kibana login credentials.
Once I did this I was able to log into "elastic"/Kibana and get back to searching through logs.
This is what I did as root:
# /usr/share/elasticsearch/bin/elasticsearch-users useradd alsunseri
( enter a new password and enter it a again to confirm )
# /usr/share/elasticsearch/bin/elasticsearch-users roles alsunseri --add kibana_admin
# /usr/share/elasticsearch/bin/elasticsearch-users roles alsunseri --add kibana_system
# /usr/share/elasticsearch/bin/elasticsearch-users roles alsunseri --add superuser
Then I was able to login to kibana/elastic again on port 5061
Later I can remove the superuser role and only grant what is needed.