bash
curl -X PUT "https://<elasticsearch_host>:9200/_security/user/newuser" -H "Content-Type: application/json" -d'
{
"password" : "newuserpassword",
"roles" : [ "superuser" ],
"full_name" : "New User"
}' -u admin_user:admin_password --cacert path_to_ca.crt
其中,需要修改的地方有:https请求url中的newuser修改为你的用户名,full_name修改为你的用户名,-u后面的两个参数也要修改,修改为elastic, path_to_ca.crt 替换为你的证书文件绝对路径。
点击加号"+",选择curl导入:
如果想删除用户:
bash
curl -X DELETE "https://<elasticsearch_host>:9200/_security/user/<username>" -u admin_user:admin_password
其中是需要删除的用户名,-u后面的参数也需要修改。改为elastic用户。