HiveBrain v1.2.0
Get Started
← Back to all entries
snippetMinor

How to show all users of all databases in mongodb?

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
showdatabasesallmongodbhowusers

Problem

I know show users or db.getUsers() can show all users in current database in mongodb, but how to list all users in all databses for ease of management as an administrator?

Solution

You can find information about all users in all databases in system.users collection of admin database. See MongoDB documentation for system.users collection.

Context

StackExchange Database Administrators Q#136949, answer score: 5

Revisions (0)

No revisions yet.