elastic用户重置密码

605 阅读1分钟

问题:kibana不能查询到日志。

1.排查:

kibana配置的用户是elastic ,es集群后台日志报错鉴权失败,postman用原有elastic用户密码查询,返回401鉴权失败。 如图

image.png

2.解决步骤:

1.登录到服务器新建超级用户

bin/elasticsearch-users useradd elastic1 -p 123456 -r superuser 2.使用新建elastic1用户发送请求重置elastic用户的密码 http://localhost:9200/_xpack/security/user/elastic/_password?pretty
{
"password" : "new_password"
}