I have a mongoDB replicaSet that has 3 DBs - PRIMARY/SECONDARY + Arbiter. All 3 were installed the same manner - meaning they have admin database with a default password.
Now - I want to change the default passwords. On primary/secondary it worked well.
mongo admin -u admin -p <password> --authenticationDatabase=admin
db.changeUserPassword("admin",<new password>)
However - in the arbiter it isn't working (even after adding rs.slaveOK()
in the PRIMARY)
I'm getting:
2016-12-01T00:18:51.408-0800 E QUERY [thread1] Error: Updating user failed: not master :
_getErrorWithCode@src/mongo/shell/utils.js:25:13
DB.prototype.updateUser@src/mongo/shell/db.js:1319:15
DB.prototype.changeUserPassword@src/mongo/shell/db.js:1323:9
@(shell):1:1
Any ideas how to change arbiter admin password?