[DOCS-2160] Outdated addUser() example in the 2.5.3 documentation Created: 28/Oct/13  Updated: 11/Jan/17  Resolved: 04/Nov/13

Status: Closed
Project: Documentation
Component/s: manual
Affects Version/s: None
Fix Version/s: 01112017-cleanup

Type: Bug Priority: Major - P3
Reporter: Luke Lovett Assignee: Bob Grabar
Resolution: Done Votes: 0
Labels: 26qa
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Participants:
Days since reply: 10 years, 16 weeks, 2 days ago

 Description   

Some of the given examples on the userAdd manual page are outdated and don't work on 2.5.3. To reproduce one example:

db.addUser( { user: "<user>", userSource: "<database>", roles: [<roles>] } )

The userSource field is not a valid field anymore in addUser. I believe that you now must switch to the database where the user's credentials should be delegated, then add the user from there (and this only works for $external, too).

use $external
db.addUser( { user: "<user>", roles: [<roles>] } )


Generated at Thu Feb 08 07:42:47 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.