Install the latest version of RABBITMQ (3.3.1), and enable management plugin, using the default account guest login to the management console, but prompted the login failed.
After looking through the official release document, I learned that because the account guest has all the operation rights, and is the default account, for security reasons, guest users can only use localhost login, It is recommended that you modify the password of the guest user and create new account management using RABBITMQ (this feature was introduced in version 3.3.0).
Although it can be in a more wretched way: The Ebin directory under the Rabbit.app loopback_users in the << "guest" >> Delete,
and restart the RABBITMQ, can use the Guest account any IP login management console, but always contrary to the original intention of the designer, coupled with the previous understanding of this piece is not much, so it is necessary to summarize.
1. User Management
User management includes adding users, deleting users, viewing user lists, and modifying user passwords.
The corresponding command
(1) Add a new 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 current user list
Rabbitmqctl list_users
2. User Roles
According to the individual understanding, the user role can be divided into five categories, Super Administrator, monitor, strategy-makers, general managers and others.
(1) Super Administrator (Administrator)
You can access the admin console (with management plugin enabled) to view all the information and to operate on the user, policy.
(2) Monitor (monitoring)
Login to the admin console (with management plugin enabled), while you can view information about the RABBITMQ node (number of processes, memory usage, disk usage, etc.)
(3) strategy-makers (policymaker)
You can log in to the management console (with management plugin enabled) and manage the policy. However, you cannot view information about the node (the part that is identified by the red box).
In contrast to administrator, administrator can see these things
(4) General Manager (Management)
You can only log in to the administration console (with management plugin enabled), you cannot see the node information, and you cannot manage the policy.
(5) Other
Unable to login to the management console, usually the average producer and consumer.
Once you understand this, you can set different roles for different users as needed to manage on-demand.
The commands for setting the user role are:
Rabbitmqctl set_user_tags User Tag
User is the username, tag is the role name (corresponds to the above administrator,monitoring,policymaker,management, or other custom name).
You can also set multiple roles for the same user, such as
Rabbitmqctl set_user_tags HNCSCWC Monitoring policymaker
3. User Rights
User right refers to the user's operation rights to Exchange,queue, including configuration permission, read and Write permission. Configuring permissions affects the Declaration and deletion of Exchange,queue. Read and Write permissions affect the fetching of messages from a queue, sending messages to exchange, and binding (BIND) operations to queue and exchange.
For example, if you bind a queue to an exchange, you need to have write permissions for the queue, as well as the readable permissions for Exchange, you need to have Exchange writable permissions to send messages to exchange, and you need to have queue-readable permissions to fetch data from the queue. Please refer to the "How Permissions Work" section of the official documentation for details.
The relevant commands are:
(1) Set user permissions
Rabbitmqctl set_permissions-p vhostpath User CONFP writep readp
(2) view (specify Hostpath) permissions information for all users
Rabbitmqctl list_permissions [-P Vhostpath]
(3) View permission information for a specified user
Rabbitmqctl list_user_permissions User
(4) Clear User's permission information
Rabbitmqctl clear_permissions [-P Vhostpath] User
RABBITMQ Web Management interface cannot log on with guest user