赞
踩
$sudo rabbitmqctl add_user user_admin passwd_admin
赋予其administrator角色:
$sudo rabbitmqctl set_user_tags user_admin administrator
$sudo rabbitmqctl add_user user_monitoring passwd_monitor
赋予其monitoring角色:
$sudo rabbitmqctl set_user_tags user_monitoring monitoring
$sudo rabbitmqctl add_user user_proj passwd_proj
赋予其monitoring角色:
$sudo rabbitmqctl set_user_tags user_proj management
$sudo rabbitmqctl list_users
$sudo rabbitmqctl set_permissions -p /vhost1 user_admin '.*' '.*' '.*'
该命令使用户user_admin具有/vhost1这个virtual host中所有资源的配置、写、读权限以便管理其中的资源
查看权限:
$sudo rabbitmqctl list_user_permissions user_admin
Listing permissions for user "user_admin" ...
/vhost1<span style="white-space:pre"> </span>.*<span style="white-space:pre"> </span>.*<span style="white-space:pre"> </span>.*
$sudo rabbitmqctl list_permissions -p /vhost1
Listing permissions in vhost "/vhost1" ...
user_admin<span style="white-space:pre"> </span>.*<span style="white-space:pre"> </span>.*<span style="white-space:pre"> </span>.*
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。