I ham using Mongo 2.4.9 and am having problems with user permissions and authorization.
I have created an admin database and an admin user with the following permissions:
{
"user" : "admin",
"pwd" : "90b114dd1744b337cd2f1e665cfd6c99",
"roles" : [
"userAdminAnyDatabase",
"dbAdminAnyDatabase",
"readWriteAnyDatabase",
"clusterAdmin"
],
I connect to the DB using:
./mongo localhost:27000/admin -u admin -p passw0rd --authenticationDatabase admin
but if I try to get Info about another user on the db, I get a "errmsg" : "no such cmd: usersInfo" error. Is this not available in Mongo 2.4.9?
> db.runCommand(
... {
... usersInfo:"manager",
... showPrivileges:true
... }
... )
{
"ok" : 0,
"errmsg" : "no such cmd: usersInfo",
"bad cmd" : {
"usersInfo" : "manager",
"showPrivileges" : true
}
}
I am trying to track down long running operations on my mongo db by running the db.currentOps() command but I'm getting "unauthorized" errors:
> db.currentOp()
{ "err" : "unauthorized" }
Can some one please tell me how I can grant permissions or view permissions that that I can running commands to see long running queries/operations and, if needed kill them,
Thanks
Clare