i have created a user with the following credential:
db.addUser( { user: "superadmin3",
pwd: "superadmin3",
roles: [ "readWrite", "dbAdmin","userAdminAnyDatabase","clusterAdmin" ]
} )
Than started mongod with --auth:true
but I am not able to login when I say:
db.auth("superadmin3","superadmin3");
I get the following error:
error: { "$err" : "not authorized for query on test.system.users", "code" : 16550 } at src/mongo/shell/query.js:128
I want to create a credential for all the databases present.