Is there a super UNIX like "root" user for MongoDB? I've been looking at http://docs.mongodb.org/manual/reference/user-privileges/ and have tried many combinations, but they all seem to lack in an area or another. Surely there is a role that is above all the ones listed there.
The superuser role in MongoDB is the root.
Centralized User Data For users created in MongoDB, MongoDB stores all user information, including name , password , and the user's authentication database , in the system. users collection in the admin database. Do not modify this collection directly. To manage users, use the designated user management commands.
To list existing users in MongoDB, you can use the db. getUsers() method to show all of the users within the current database.
The best superuser role would be the root.The Syntax is:
use admin db.createUser( { user: "root", pwd: "password", roles: [ "root" ] })
For more details look at built-in roles.
Hope this helps !!!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With