Hello everybody,
We have some questions about how to reset password for users in discourse.
We know that the command “RAILS_ENV=production /usr/local/bin/bundle exec rake admin:create” can reset the password for existing users or create a new admin user. But we do not want to reset password for admin user using this method. We want to reset password for users in PostgreSQL database.
The user information is stored in users table in postgresql database. And we can check the users and password using “select id, username, name, password_hash from users;”. So we have two questions.
- How does the password encrypt? MD5 ? Sha256?
- Can we reset password using " UPDATE users SET password_hash = ‘there is a hash password’ WHERE id=1; " ?
If someone has an idea it would be really helpful, thank you!