Removes the user from the database on which you run the command. The
dropUsercommand has the following syntax:
dropUsercommand document has the following fields:
Field Type Description
string The name of the user to delete. You must issue the
dropUsercommand while using the database where the user exists.
document Optional. The level of write concern for the removal operation. The
writeConcerndocument takes the same fields as the
Before dropping a user who has the
userAdminAnyDatabaserole, ensure you have at least another user with user administration privileges.
The following sequence of operations in the
mongo shell removes
reportUser1 from the