[DOCS-8643] db.dropUser command needs more information Created: 23/Aug/16  Updated: 30/Oct/23  Resolved: 28/Jun/23

Status: Closed
Project: Documentation
Component/s: Server
Affects Version/s: None
Fix Version/s: Server_Docs_20231030

Type: Task Priority: Major - P3
Reporter: Rachelle Palmer Assignee: Andrew Aldridge
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:
Days since reply: 32 weeks ago

 Description   

Can we be more explicit regarding what happens when running the command db.dropUser() from the mongo shell?

The current documentation is a bit sparse.

Completing the db.dropUser() action causes the user to be dropped, but any items created by that user in the database will remain. That is "nothing else happens, no other collections or data created by that user will be modified."

Context: other database experience where databases/objects have owners, so removing a user could lead to other items being deleted or orphaned.



 Comments   
Comment by Sarah Olson [ 28/Jun/23 ]

Closing due to the above comments. It sounds like there's not much else to say. rachelle.palmer@mongodb.com, please feel free to reopen or give me a shout if you disagree. 

Comment by Stennie Steneker (Inactive) [ 23/Aug/16 ]

There isn't really more to elaborate on. As at MongoDB 3.2 there is no concept of ownership for databases or documents, so db.dropUser(username) only affects dropping privileges for the given username in the current database and removing this user from the auth cache.

Code reference: https://github.com/mongodb/mongo/blob/v3.2/src/mongo/db/commands/user_management_commands.cpp#L912

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