Unauthorized not authorized on admin to execute command { getLog: "global" }

374 views
Skip to first unread message

Vishesh Singhal

unread,
Jan 11, 2016, 7:17:04 AM1/11/16
to mongodb-user
Hi,

I am connecting to Mongo Node with a user having roles: ["userAdminAnyDatabase"] assigned to it.
When I am tring to run command :   db.adminCommand({getLog: "*"})
it says: 
{
        "ok" : 0,
        "errmsg" : "not authorized on admin to execute command { getLog: \"*\" }",
        "code" : 13
}

Please help

Regards,
Vishesh

Stephen Steneker

unread,
Jan 11, 2016, 4:46:44 PM1/11/16
to mongodb-user
Hi Vishesh,

The userAdminAnyDatabase role does not grant permission to run getLog; that requires the clusterMonitor or clusterAdmin role:

Regards,
Stephen
Reply all
Reply to author
Forward
0 new messages