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"
}'