...
- Establish a connection to MongoDB via mongo CLI - See Connect to MongoDB with mongo CLI
Switch to admin db with
use admin
No Format > use admin switched to db admin
Use
db.getUsers()
to list existing usersNo Format > db.getUsers() [ { "_id" : "admin.bvq", "user" : "bvq", "db" : "admin", "roles" : [ { "role" : "root", "db" : "admin" } ] } ]
See https://docs.mongodb.com/v3.4/core/security-built-in-roles/ for available roles in MongoDB