误操作删除.sercurty 索引或者忘记密码
创建一个基于本定认证的超级管理员 以下例子将一个新用户添加my_user,该用户的密码为my_user,并且该用户于superuser角色
bin/elasticsearch-users useradd my_user -p my_user -r superuser
启动 start elasticsearch service 服务
--CALL API RESET elastic SUPERVISE admin PASSWORD
--通过api 重置 elastic 超级管理员的密码
curl -XPUT -u"my_user:my_user" 'http://localhost:9200/_xpack/security/user/elastic/_password' -d'{"password" :"pw@2020"}' -H "Content-Type:application/json"
/data/elasticsearch-7.5.1/bin/elasticsearch-users list 查看本地用户
https://www.elastic.co/guide/en/elasticsearch/reference/current/users-command.html
elasticsearch 密码重置
于 2024-05-14 12:13:34 首次发布