| Steps To Reproduce: |
2.6.0-rc1 shell, 2.4.9 server
> userObj = {user:'bob', pwd:'a', roles:['read']}
|
{
|
"user": "bob",
|
"pwd": "a",
|
"roles": [
|
"read"
|
]
|
}
|
> db.addUser(userObj)
|
WARNING: The 'addUser' shell helper is DEPRECATED. Please use 'createUser' instead
|
Inserted 1 record(s) in 14ms
|
Successfully added user: {
|
"user": "bob",
|
"roles": [
|
"read"
|
],
|
"_id": ObjectId("5318d2f453c8583362580e4e")
|
}
|
> userObj
|
{
|
"user": "bob",
|
"roles": [
|
"read"
|
],
|
"_id": ObjectId("5318d2f453c8583362580e4e"),
|
"pwd": "a"
|
}
|
> db.dropDatabase()
|
{ "dropped": "test", "ok": 1 }
|
> db.addUser(userObj)
|
WARNING: The 'addUser' shell helper is DEPRECATED. Please use 'createUser' instead
|
2014-03-06T14:58:14.974-0500 Error: couldn't add user: no such cmd: _id at src/mongo/shell/db.js:1007
|
|