Rocket.chat: Mass delete users

Created on 27 Sep 2017  路  6Comments  路  Source: RocketChat/Rocket.Chat

Is there a way to mass delete users ?
From the UI I can only delete one by one and as I have totally missed my LDAP import, I now have 300+ account to delete... So before I trash the whole mongo db, is there a way to mass delete users or at least is there a way to only dump users db directly in the mongo db ?

Most helpful comment

It is better to remove only LDAP users run the command:
db.users.remove({"ldap": true});

All 6 comments

Unfortunately, there is not UI for this yet, but you can delete the users directly on the database on the users collection.

Okay, thanks for the quick answer.

For the record, here is a quick how-to for the mongodb noob like me:
Stop rocket.chat and enter the mongo shell with "mongo" and then:

use rocketchat
db.users.drop()

Okay, thanks for the quick answer.

For the record, here is a quick how-to for the mongodb noob like me:
Stop rocket.chat and enter the mongo shell with "mongo" and then:

use rocketchat
db.users.drop()

this command dele all users, including the administrator =/

It is better to remove only LDAP users run the command:
db.users.remove({"ldap": true});

How to remove an individual user?

LDAP integration documentation in Rocket Chat could really use some community support.

How to remove an individual user?

You can remove an individual user directly from the admin panel. This is the safer way.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

engelgabriel picture engelgabriel  路  3Comments

lunitic picture lunitic  路  3Comments

karlprieb picture karlprieb  路  3Comments

zeigerpuppy picture zeigerpuppy  路  3Comments

mddvul22 picture mddvul22  路  3Comments