es添加用户

curl  --insecure -u elastic:Transfar@2022 -XPOST 'https://192.168.30.149:9200/_security/user/adminuser?pretty' -H 'Content-Type: application/json' -d '
{
    "password":"XXXXX",
    "roles" : ["superuser"]
}'

curl --insecure -u adminuser:XXXXX -XGET 'https://192.168.30.149:9200/_cat/indices?v&pretty'
posted @ 2023-02-07 16:40  有点丿东西  阅读(34)  评论(0编辑  收藏  举报