I have a database called “mydb.” In it there is a collection called “users,” which is where my users are stored.
I don’t have the mail server setup on the VPS I am using so I cannot use the reset password feature in my meteor app.
How do a change a user email using command line? I tried
mongo
use mydb
db.users.changeUserPassword(“user”, “newPwd”)
but that did not work and I couldn’t find much info online. Any help is much appreciated. I am using Mongo shell v2.6.7
This needs to have the addition that what is hashed using bcrypt is the sha256 of the password SHA256(password)
I know this too old but I think this is important and worth the bump …
So you can install this bcrypt-cli globally like this :