Change Guest User Password of RabbitMQ

Important Note: It is recommended to delete the guest user or change its password and permissions in a production environment to enhance security, as the default credentials are widely known.

The default user for RabbitMQ is guest and the password is also as guest, you might want to change it so that others cannot access it.

To change the default guest user password in RabbitMQ, follow these steps:

  1. Access the RabbitMQ Management Interface:
    • Open a web browser and go to the RabbitMQ management interface, typically available at:
      http://localhost:15672
    • Log in using the default credentials (guest as both username and password). Note that the default guest user is only allowed to connect from localhost.
  2. Change the Password:
    • Once logged in, navigate to the Admin tab.
    • Click on the Users section.
    • Select the guest user from the list of users.
    • Click on the Update this user button.
    • Enter the new password in the Password and Confirm Password fields.
    • Click on Update user to save the changes.
  3. Change RabbitMQ Password for Guest User

You can also change the password using command line.

  1. Command Line Method:
    • Alternatively, you can change the password using the command line. Open a terminal and execute the following command, replacing new_password with the desired password:
    • rabbitmqctl change_password guest new_password
  2. Restart RabbitMQ (if necessary):
    • In some cases, you may need to restart RabbitMQ for the changes to take effect. This can be done using the following command:
    • rabbitmqctl stop_app

      rabbitmqctl start_app

Remember, after changing the password, any clients or services using the old credentials must be updated to use the new password to ensure uninterrupted service.

Comments & Discussion

Facing issues? Have questions? Post them here! We're happy to help!