root role in mongodb1 min read

Prabhin Prabharkaran Administrator
DevOps Engineer

He is a Technical professional. He is a person who loves to share tricks and tips on the Internet. He Posts what he does!

follow me

Hi All, this document deals with to add a user in MongoDB with root role. This user will have the super admin access over the admin database to perform all admin related activities.

Step 1: Login to mongo shell.


Step 2: create a user with root role.

user: 'adminuser',
pwd: 'yourpassword',
roles: [ { role: 'root', db: 'admin' } ]

© 2019, Techrunnr. All rights reserved.

Questions Answered
Articles Written
Overall Points

Related posts

Leave a Reply