|
Not sure which version of MongoDB the reporter is using – but using MongoDB 2.4, am able to create user
launching: ./mongodb-2.4.14/bin/mongos on port 27017
|
adding shards. can take up to 30 seconds...
|
MongoDB shell version: 2.4.14
|
connecting to: test
|
mongos> use admin
|
switched to db admin
|
mongos> db.addUser(
|
... {user: "root", pwd: "test it out", roles: ["userAdminAnyDatabase" ] } )
|
{
|
"user" : "root",
|
"pwd" : "cfbd30796397e482a67dfd4f56be39d3",
|
"roles" : [
|
"userAdminAnyDatabase"
|
],
|
"_id" : ObjectId("560cb0a71143876c5450c3db")
|
}
|
|
|