tokumx - Locked outside mongodb replica set -
i have mongodb replica-set of 3 members (version 2.4) in administrator user 'admin' db not have 'useradminanydatabase' role.
this role required managing users on databases.
the roles have are: [ "readwriteanydatabase", "dbadminanydatabase", "clusteradmin" ]
i tried updating roles myself or creating new user, have no permission access db.system.users in admin db.
i tried setting noauth=true did not help. when removing keyfile well, db not able sync other members (obviously) , got stuck in recovery state.
i found similar question refers stand alone db (no replica set) doesn't in case.
what best way add role while having minimal system downtime?
i use mongodump , mongorestore backup data rebuild node right permissions , restore data.
however approach should work:
if have locked out need following:
- stop mongodb instance
- remove --auth and/or --keyfile options mongodb config disable authentication
- start instance without authentication
- edit users needed
- restart instance authentication enabled
Comments
Post a Comment