0

I would like to change the password of a Rocketchat user from the mongo command prompt. I followed to the letter the documentation provided by Rocketchat at this address:https://rocket.chat/docs/administrator-guides/restoring-an-admin/ but when I run the following command:

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

I get 3 small points and nothing else...

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

Is there another way to change the value of the user's password? The use of the "Forgotten Password" feature does not work.

Thank you. Thank you.

GotExx
  • 1
  • The ... indicates the mongo shell is still expecting more input, so you have an incomplete statement or a syntax error. In this case your update() example is missing a closing ). – Stennie Oct 13 '19 at 18:56
  • Exactly, it's an oversight on my part. You can write a reply so I can mark it as a "valid reply" – GotExx Oct 16 '19 at 07:39
  • If the issue was just a syntax error, I'd close/remove the question unless you think this is likely to help other users. It looks like the Rocketchat docs have the correct syntax (and same example) so this was probably a cut & paste accident. – Stennie Oct 17 '19 at 00:54

0 Answers0