怎么重置root密码
Closed this issue · 4 comments
HoGC commented
修改了root密码 ,应该是改的时候输错了,登录一直密码错误了,
请问怎么重置root密码?
jamebal commented
重制管理员密码
进入mongodb容器
./jc.sh mongo mongo
切换至数据库:jmalcloud
> use jmalcloud;
重置密码(初始管理员):
> db.getCollection('user').update({ "creator": true }, {$set: { 'password': '1000:c5b705ea13a1221f5e59110947ed806f8a978e955fbd2ed6:22508de12228c34a235454a0caf3bcaa5552858543258e56' }},{"multi": false, "upsert": false});
重启服务:
sudo docker restart jmalcloud_server
重置后的密码为:jmalcloud
HoGC commented
> use jmalcloud;
switched to db jmalcloud
> db.getCollection('user').update({ "creator": true }, {$set: { 'password': '1000:c5b705ea13a1221f5e59110947ed806f8a978e955fbd2ed6:22508de12228c34a235454a0caf3bcaa5552858543258e56' }},{"multi": false, "upsert": false});
WriteResult({ "nMatched" : 1, "nUpserted" : 0, "nModified" : 1 })
> exit
jamebal commented
需要重启下服务:
docker restart jmalcloud_server
HoGC commented
可以了 重置成功了