← 返回命令列表

Linux command

rabbitmqctl-users 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

List users

rabbitmqctl list_users

Add user

rabbitmqctl add_user [username] [password]

Delete user

rabbitmqctl delete_user [username]

Change user password

rabbitmqctl change_password [username] [new_password]

Set user tags

rabbitmqctl set_user_tags [username] [administrator]

Set permissions

rabbitmqctl set_permissions -p [vhost] [username] ".*" ".*" ".*"

List permissions

rabbitmqctl list_user_permissions [username]

Verify

rabbitmqctl authenticate_user [username] [password]

说明

rabbitmqctl user commands manage RabbitMQ users and permissions. Create users, set passwords, assign roles, and configure vhost access. Part of RabbitMQ server management. These commands only manage users in the internal RabbitMQ database; users from alternative authentication backends (such as LDAP) cannot be managed with these commands.

参数

list_users
List all users.
add_user _user_ _pass_
Create user.
delete_user _user_
Remove user.
change_password _user_ _pass_
Change password.
clear_password _user_
Remove password for a user, preventing password-based login.
authenticate_user _user_ _pass_
Verify whether credentials match a user's stored authentication.
set_user_tags _user_ _tags ..._
Set role tags (administrator, monitoring, management, policymaker). Replaces all existing tags.
set_permissions -p _vhost_ _user_ _conf_ _write_ _read_
Set vhost permissions using regex patterns for configure, write, and read operations.
clear_permissions -p _vhost_ _user_
Revoke all permissions for a user on a vhost.
list_permissions -p _vhost_
List all users with access to a vhost and their permissions.
list_user_permissions _user_
List all vhosts a user has access to and their permissions.
-p _vhost_
Target virtual host (default: "/").

FAQ

What is the rabbitmqctl-users command used for?

rabbitmqctl user commands manage RabbitMQ users and permissions. Create users, set passwords, assign roles, and configure vhost access. Part of RabbitMQ server management. These commands only manage users in the internal RabbitMQ database; users from alternative authentication backends (such as LDAP) cannot be managed with these commands.

How do I run a basic rabbitmqctl-users example?

Run `rabbitmqctl list_users` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does list_users do in rabbitmqctl-users?

List all users.