-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
Labels:
-
Environment:Windows 2012 running the server my machine is windows 8.1. I am accessing mongo via robomongo
*Location*: http://docs.mongodb.org/manual/tutorial/assign-role-to-user/
*User-Agent*: Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.120 Safari/537.36
*Referrer*: http://docs.mongodb.org/manual/administration/security-user-role-management/
*Screen Resolution*: 1920 x 1080
*repo*: docs
*source*: tutorial/assign-role-to-user
Windows 2012 running the server my machine is windows 8.1. I am accessing mongo via robomongo *Location*: http://docs.mongodb.org/manual/tutorial/assign-role-to-user/ *User-Agent*: Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/37.0.2062.120 Safari/537.36 *Referrer*: http://docs.mongodb.org/manual/administration/security-user-role-management/ *Screen Resolution*: 1920 x 1080 *repo*: docs *source*: tutorial/assign-role-to-user
I am running mongo 2.6 and when attempting to add a role the command
db.grantRolesToUser threw an error saying that the command did not exist.
I ended up stumbling upon another syntax that actually worked (Makes me think your documentation is out of date) Below worked on mongo 2.6.1
db.runCommand(
{ grantRolesToUser: "remote",
roles: [
],
writeConcern:
} )