添加用户:rabbitmqctl add_user {username} {password}
删除用户:rabbitmqctl delete_user {username}
修改密码:rabbitmqctl change_password {username} {newpassword}
设置用户角色:rabbitmqctl set_user_tags {username} {tag}
tag可以为administrator, monitoring, management
举例:
rabbitmqctl add_user root root
rabbitmqctl set_user_tags root administrator
rabbitmqctl list_users
rabbitmqctl delete_user FC_TO_CSS_producer01
rabbitmqctl delete_user BAS_TO_BAS_vhost_producer01
rabbitmqctl delete_user CMM_SYS_PRD_producer04
[root@WH0PRDMQC00AP0002 .scripts]# rabbitmqctl add_user test 123456789
Creating user "test" ...