How to create a user from the command line in RabbitMQ

Below is a quick snippet on how to create a command-line user with administrator privileges on RabbitMQ .

# We created an “admin” user with the password “password” rabbitmqctl add_user admin password

Added the “admin” tag to the “admin” user

rabbitmqctl set_user_tags admin administrator

Added permissions for user “admin” on vhost ”/”

rabbitmqctl set_permissions -p / admin ”.*” ”.*” ”.*”