How do I create or add a user to rabbitmq?

Rabbitmq

Rabbitmq Problem Overview


This seems like a question that should be easily be googleable. It is not though. Can anybody help?

How do I create a new user for rabbitmq?

Rabbitmq Solutions


Solution 1 - Rabbitmq

I have found this very useful

This adds a new user and password
rabbitmqctl add_user username password
This makes the user a administrator
rabbitmqctl set_user_tags username administrator
This sets permissions for the user
rabbitmqctl set_permissions -p / username ".*" ".*" ".*"

See more here https://www.rabbitmq.com/rabbitmqctl.8.html#User_Management

Solution 2 - Rabbitmq

You can use the rabbitmqctl tool - look for subtitle User management. The command to create a user is:

$ rabbitmqctl add_user myUser myPass

To make user an administrator run:

$ rabbitmqctl set_user_tags myUser administrator

Also if you use rabbitmq web UI - the management plugin you can do it quite easily, it's pretty intuitive.

If you want to do it programmatically you can also use rabbitmq rest API, also explained in (on?) the link for management plugin.

Solution 3 - Rabbitmq

you want to add new user for RabbitMQ server just run below comments cmd :

  1. rabbitmqctl add_user test test
  2. rabbitmqctl set_user_tags test administrator
  3. rabbitmqctl set_permissions -p / test ".*" ".*" ".*"

Solution 4 - Rabbitmq

To enable RabbitMQ admin management user please follow :

  • rabbitmqctl add_user daniel daniel
  • rabbitmqctl set_user_tags daniel administrator
  • rabbitmqctl set_permissions -p / daniel ".*" ".*" ".*"
  • List item

Now access your RabbitMQ admin on the your host as :

http://{youhostname}:15672/#/

and, log in with your above user account!

Solution 5 - Rabbitmq

Once the management plugin has been enabled you can also use the REST API.

PUT /api/users/name

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionTobias GassmannView Question on Stackoverflow
Solution 1 - RabbitmqJohn KitonyoView Answer on Stackoverflow
Solution 2 - RabbitmqcantSleepNowView Answer on Stackoverflow
Solution 3 - RabbitmqBharathirajaView Answer on Stackoverflow
Solution 4 - RabbitmqDaniel AdenewView Answer on Stackoverflow
Solution 5 - RabbitmqJeremy HammView Answer on Stackoverflow