If you are not able to login kibana due to password not working and authentication error please use below process
- Stop elasticsearch
- Go to directory elasticsearch/bin
- Create new super user via below
./elasticsearch-users useradd elasticadmin -p elasticadmin -r
superuser
Start elasticsearch process
Try running below command with new user you should get user list:
curl -u elasticadmin -XGET
'http://localhost:9200/_xpack/security/user?pretty'
Enter host password for user 'newadmin':
{ "elastic" : {
"username" : "elastic",
"roles" : [
"superuser"
],
"full_name" : null,
"email" : null,
"metadata" : {
"_reserved" : true
},
"enabled" : true }, "kibana" : {
"username" : "kibana",
"roles" : [
"kibana_system"
],
"full_name" : null,
- Run below curl command to change password of elastic user.
curl --user elasticadmin:#l@$t!c@dm!n -XPUT
"http://localhost:9200/_xpack/security/user/elastic/_password?pretty"
-H 'Content-Type: application/json' -d'{ "password" : "typeyourpasswordhere"}'
- Try login elasticsearch with new password of elastic user
curl -u elastic -XGET "http://localhost:9200/"
- In the similar way you can change password of kibana or other users as well