ELasticsearch忘记密码后重置超级用户密码

创建一个临时的超级用户TestSuper:

[root@cfeea elasticsearch]# ./bin/elasticsearch-users useradd TestSuper -r superuser
Enter new password: 
Retype new password: 

用这个用户去修改elastic的密码:

curl -XPUT -u TestSuper:123456 http://localhost:9200/_xpack/security/user/elastic/_password -H "Content-Type: application/json" -d '
{
  "password": "q5f2qNfUJQyvZPIz57MZ"
}'
posted @ 2021-01-12 14:59  哈喽哈喽111111  阅读(1862)  评论(0编辑  收藏  举报