Robert
Robert

Reputation: 135

Reset admin password for Kibana

I'm locked out of the admin page for our Kibana instance. I have a root shell on the box and can access all configurations. How do I go about resetting the admin password, so I can login to Kibana as admin? I can authenticate as kibana user, but I get this message when I try to manager users, "You do not have permission to manage users"

Upvotes: 2

Views: 13423

Answers (1)

Val
Val

Reputation: 217294

XPack Security provides a file realm whose purpose is to help you when you are locked out of the system.

First, add this to your elasticsearch.yml configuration file:

xpack:
  security:
    authc:
      realms:
        file1:
          type: file
          order: 0

Then you can use the bin/x-pack/users command to add a new user with

bin/x-pack/users useradd superguy

Then you can give that new user superadmin priviledges

bin/x-pack/users roles superguy -a superuser

Now you have a new user called superguy which has superuser role and you can use it to reset your admin password.

Upvotes: 3

Related Questions