I have a 3-member mongodb replica set (version 2.4) in which the admin user for "admin" db does not have the userAdminAnyDatabase role.
This role is required to manage users in all databases.
The roles that I have now are: ["readWriteAnyDatabase", "dbAdminAnyDatabase", "clusterAdmin"]
I tried to update the roles for myself or create a new user, however I do not have permission to access db.system.users in the admin db.
I tried to set noauth = true, but that did not help. When deleting keyFile, db was unable to sync with other members (obviously) and was stuck in RECOVERY state.
I found a similar question that relates to standalone db (without a set of replicas), so in this case it really doesn't help.
What would be the best way to add this role with minimal downtime?
source
share