ElasticSearch之elasticsearch-users用法及修改集群密码
elasticsearch-users -h/--help查看用法/app/elasticsearch-7.8.0/bin/elasticsearch-users -h******/app/elasticsearch-7.8.0/bin/elasticsearch-users -h******Manages elasticsearch file usersCommands--------usera
elasticsearch-users -h/--help查看用法
/app/elasticsearch-7.8.0/bin/elasticsearch-users -h
******/app/elasticsearch-7.8.0/bin/elasticsearch-users -h******
Manages elasticsearch file users
Commands
--------
useradd - Adds a file user
userdel - Deletes a file based user
passwd - Changes the password of an existing file based user
roles - Edit roles of an existing user
list - List existing file based users and their corresponding roles
Non-option arguments:
command
Option Description
------ -----------
-E <KeyValuePair> Configure a setting
-h, --help Show help
-s, --silent Show minimal output
-v, --verbose Show verbose output
******/app/elasticsearch-7.8.0/bin/elasticsearch-users -h******
创建超级用户,一般用于修改密码
/app/elasticsearch-7.8.0/bin/elasticsearch-users useradd myusers -p myuser -r superuser
curl -XPUT -u"myusers:myuser" “http://localhost:9200/_xpack/security/user/elastic/_password?pretty” -H “Content-Type: application/json” -d ‘{“password” : “xxxxxx”}’
查看已经创建的用户
/app/elasticsearch-7.8.0/bin/elasticsearch-users list
myusers : superuser
删除已经创建的用户
/app/elasticsearch-7.8.0/bin/elasticsearch-users userdel myusers
所有创建的用户都存于这个文件里
vim /app/elasticsearch-7.8.0/config/users_roles
全篇完
更多推荐
所有评论(0)