Monday, October 29, 2018

Reset Rocketchat lost Admin Password

Resetting RocketChat admin password

This method was test on a rocketchat on Ubuntu

Login into Ubunut CLI

Connect to MongoDB using this command:

sudo rocketchat-server.mongo


Select Rocket.Chat Database:

use parties





This command resets the username "administrator" to "12345".  If your system uses a different name, just change that name in the command below.

db.getCollection('users').update({username:"administrator"}, { $set: {"services" : { "password" : {"bcrypt" : "$2a$10$n9CM8OgInDlwpvjLKLPML.eizXIzLlRtgCh3GRLafOdR9ldAUh/KG" } } } })

You SHOULD be able to login to your server using the password 12345

4 comments:

  1. Replies
    1. This is a life saver :-) I think the setup wizard did not ask me to enter admin password twice and I was hosed..
      Thanks again.

      Delete
    2. Welcome! Glad to have been able to help :)

      Delete

Feel free to leave a comment! If you have any information that you think should be included, please do so here and I'll get it added in.