Hi All,
I have a shard cluster with 2 shards each 3 node replicaset with one arbiter.
I do have access to the DB and I can connect to mongos node shell.Since we are planning for upgrade while checking the shards login am not able to connect hence user is not created on individual shards.
I tried to disable the authorization for one shard and tried to create user for which am getting error
minAnyDatabase’, db: ‘admin’ },{ role: ‘readWriteAnyDatabase’, db: ‘admin’ },{ role: ‘backup’, db: ‘admin’ },{ role: ‘restore’, db: ‘admin’ },{ role: ‘clusterAdmin’, db: ‘admin’ }]})
uncaught exception: Error: couldn’t add user: command createUser requires authentication :
_getErrorWithCode@src/mongo/shell/utils.js:25:13
DB.prototype.createUser@src/mongo/shell/db.js:1386:11
@(shell):1:1
MongoDB Enterprise rs2:PRIMARY> rs.status()
{
“operationTime” : Timestamp(1732724625, 1),
“ok” : 0,
“errmsg” : “command replSetGetStatus requires authentication”,
“code” : 13,
“codeName” : “Unauthorized”,
“lastCommittedOpTime” : Timestamp(1732724625, 1),
“$clusterTime” : {
Can someone help me to resolve this issue. No one has admin access apart from me in the team.
Thanks
Dhivya.K