How to list out the users in Mongodb

This article explains the methods to get the full list of users in Mongodb.

We can achieve the same using any of the following queries.

Method1: Using getUsers()

>db.getUsers();

Method2: Using show

>show users;

Both the quries will give the same kind of output and can use any of this according to the convenience.

That's all…

Leave a Reply