Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to reset user for rabbitmq management

Tags:

rabbitmq

Using rabbitmq, we can install management plugin. Then we access via browser using http://localhost:55672/ using guest:guest. The problem is, I can not login anymore because i changed password and entered blank for role.

Is there any way to reset user for rabbitmq management?

like image 809
Superbiji Avatar asked Feb 05 '13 03:02

Superbiji


People also ask

How do I change the default user in RabbitMQ?

It is recommended that you update this user or delete it as per your local security policies. On the Admin tab, select Add a User. Enter the username and password provided for the RabbitMQ account during the setup and for Tags, select Set > Admin. Click Add user.

What is the default password of RabbitMQ?

Procedure: Log in to the RabbitMQ web-based management interface as admin admin using the default password of changeme.


2 Answers

You can access the user-management with rabbitmqctl and use the command:

add_user {username} {password} 

or more preferably maybe edit an existing user, or set the permissions for the new user with:

set_permissions [-p vhostpath] {user} {conf} {write} {read} 

For example use the following commands: (it is important to perform these three steps even when creating a new user, if you want to be able to login to the UI console and for your programs to work without facing any permission issues)

rabbitmqctl add_user newadmin s0m3p4ssw0rd rabbitmqctl set_user_tags newadmin administrator rabbitmqctl set_permissions -p / newadmin ".*" ".*" ".*" 

...to create a new administrator user with full access to the default / vhost.

You can find all this on the RabbitMQ homepage, and more specifically on this page

like image 166
Daniel Figueroa Avatar answered Nov 08 '22 11:11

Daniel Figueroa


The simplest way I found is to use this command to reset the password for any user in RabbitMQ

rabbitmqctl change_password <USERNAME> <NEWPASSWORD> 
like image 24
samtoddler Avatar answered Nov 08 '22 10:11

samtoddler