问题描述
使用rabbitmq,我们可以安装管理插件.然后我们通过浏览器使用 http://localhost:55672/
使用 guest:guest 访问.问题是,我不能再登录了,因为我更改了密码并为角色输入了空白.
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.
有没有办法重置rabbitmq管理的用户?
Is there any way to reset user for rabbitmq management?
推荐答案
您可以使用 rabbitmqctl
访问用户管理并使用命令:
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}
例如使用以下命令:(即使在创建新用户时执行这三个步骤也很重要,如果您希望能够登录到 UI 控制台并使您的程序在不面临任何权限问题的情况下工作)
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.
您可以在 RabbitMQ 主页 上找到所有这些内容,更具体地说,在此 页面
You can find all this on the RabbitMQ homepage, and more specifically on this page
这篇关于如何为rabbitmq管理重置用户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!