MongoDB Documentation, Release 3.0.4 See also: $map , $setIsSubset , $anyElementTrue 6.3.4 User and Role Management Tutorials Create a User Administrator Overview The following tutorials provide instructions on how to enable authentication and limit access for users with privilege roles. User administrators create users and create and assigns roles. A user administrator can grant any privilege in the database and can create new ones. In a MongoDB deployment, create the user administrator as the first user. Then let this user create all other users. To provide user administrators, MongoDB has userAdmin (page 407) and userAdminAnyDatabase (page 412) roles, which grant access to actions (page 419) that support user and role management. Following the policy of least privilege userAdmin (page 407) and userAdminAnyDatabase (page 412) confer no additional privileges. Carefully control access to these roles. A user with either of these roles can grant itself unlimited additional privileges. Specifically, a user with the userAdmin (page 407) role can grant itself any privilege in the database. A user assigned either the userAdmin (page 407) role on the admin database or the userAdminAnyDatabase (page 412) can grant itself any privilege in the system . 384 Chapter 6. Security Create a User Administrator (page 384) Create users with special permissions to to create, modify, and remove other users, as well as administer authentication credentials (e.g. passwords). Add a User to a Database (page 386) Create non-administrator users using MongoDB’s role-based authentication system. Create an Administrative User with Unrestricted Access (page 387) Create a user with unrestricted access. Create such a user only in unique situations. In general, all users in the system should have no more access than needed to perform their required operations. Create a Role (page 388) Create custom role. Assign a User a Role (page 390) Assign a user a role. A role grants the user a defined set of privileges. A user can have multiple roles. Verify User Privileges (page 391) View a user’s current privileges. Modify a User’s Access (page 393) Modify the actions available to a user on specific database resources. View Roles (page 394) View a role’s privileges. Change a User’s Password (page 395) Only user administrators can edit credentials. This tutorial describes the pro- cess for editing an existing user’s password. Change Your Password and Custom Data (page 396) Users with sufficient access can change their own passwords and modify the optional custom data associated with their user credential. "tags" : [ [ "TK" ], [ "FDW", "TGE" ] ] } ] }