This version has reached end of life on October 2016. Learn more about upgrading your version of MongoDB.

User and Role Management Tutorials

The following tutorials provide instructions on how to enable authentication and limit access for users with privilege roles.

Create a User Administrator
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
Create non-administrator users using MongoDB’s role-based authentication system.
Create an Administrative User with Unrestricted Access
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
Create custom role.
Assign a User a Role
Assign a user a role. A role grants the user a defined set of privileges. A user can have multiple roles.
Verify User Privileges
View a user’s current privileges.
Modify a User’s Access
Modify the actions available to a user on specific database resources.
View Roles
View a role’s privileges.
Change a User’s Password
Only user administrators can edit credentials. This tutorial describes the process for editing an existing user’s password.
Change Your Password and Custom Data
Users with sufficient access can change their own passwords and modify the optional custom data associated with their user credential.