After installing the latest version of rabbitmq (3.3.1), and enable management plugin, using the default guest account login management console, but failed login prompt.
Look after the official release document, that due account has all of the guest operating authority, and is the default account, for security reasons, guest users can only use localhost through landing, and proposed changes and new guest user's password other account management using rabbitmq (this feature was introduced in version 3.3.0).
Although it is possible to compare the wretched way: the lower ebin directory rabbit.app in loopback_users in the << "guest" >> delete,
and restart rabbitmq, can use guest account login management console from any IP, but always contrary to the design the original intention of those, plus before this one, not many understand, it is necessary to sum up.
- User Management
User management including increasing users, delete users, view the list of users, change user passwords.
The appropriate command
(1) add a user
rabbitmqctl add_user Username Password
(2) delete a user
rabbitmqctl delete_user Username
(3) modify the user's password
rabbitmqctl change_password Username Newpassword
(4) view the current list of users
rabbitmqctl list_users
- User Roles
According to understand, user roles can be divided into five categories, the super administrator, who monitors, policy makers, general managers and others.
(1) Super Administrator (administrator)
(Enabled management plugin's) can be found on the management console, you can view all the information, and can operate on a user policy (policy).
(2) monitors. (Monitoring)
Can be found at the management console (enabled management plugin's), and can view information rabbitmq nodes (number of processes, memory usage, disk usage, etc.)
(3) policy makers (policymaker)
(Enabled management plugin's) can be found on the management console, and can manage the policy. But you can not see the node information (section identified on the red box).
And the contrast administrator, administrator can see these contents
(4) in the manager (Management)
(Enabled management plugin's) only can be found on the management console, you can not see the node information, the policy can not be managed.
(5) Other
You could not land management console, often it is the producers and consumers.
Knowing this, you're ready to set up different users different roles as needed to manage demand.
The command to set the user role:
rabbitmqctl set_user_tags User Tag
User to user name, Tag as the role name (corresponding to the above administrator, monitoring, policymaker, management, or other custom name).
You can also be set to the same user multiple roles, such as
rabbitmqctl set_user_tags hncscwc monitoring policymaker
- User rights
It refers to a user rights to a user operation authority exchange, queue, comprising configuring permissions and access permissions. Configure permissions will affect the exchange, queue and delete statements. Read and write permissions to take affect in the message queue, and the queue to send messages and exchange binding (the bind) to the exchange operation.
For example: the queue bound to an exchange, is required to have a queue write permission, read permission, and the exchange; exchange sends a message exchange required to have write permission; taken from the queue in the queue of data needs to have read permission . For details, please refer to the official document, "How permissions work" section.
Related command:
(1) Set user rights
rabbitmqctl set_permissions -p VHostPath User ConfP WriteP ReadP
(2) View (designated hostpath) permissions information for all users
rabbitmqctl list_permissions [-p VHostPath]
(3) Check the specified user rights information
rabbitmqctl list_user_permissions User
(4) remove the user's permissions information
rabbitmqctl clear_permissions [-p VHostPath] User
Access control
Create a virtual host: rabbitmqctl add_vhost vhostpath
Delete Web Hosting: rabbitmqctl delete_vhost vhostpath
List all virtual hosts: rabbitmqctl list_vhosts
Set user rights: rabbitmqctl set_permissions [-p vhostpath] {username} {conf} {write} {read}
Clear user rights: rabbitmqctl clear_permissions [-p vhostpath] {username}
List all the permissions on the virtual host: rabbitmqctl list_permissions [-p vhostpath]
Lists the user rights: rabbitmqctl list_user_permissions {username}
Go http://www.cnblogs.com/mingaixin/p/4134920.html