How do I create or add a user to rabbitmq?
RabbitmqRabbitmq 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 :
rabbitmqctl add_user test test
rabbitmqctl set_user_tags test administrator
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