[SOLVED] Update User Password in Drupal 8

| | 1 min read

While setting up local environments for Drupal 8, everyone may find difficulty in login to the site, if the password is unknown

In Drupal core there is a script file that return the hashed password, which is core/scripts/password-hash.sh.

Run the following command to get the hashed string for '123' in the terminal.

./core/scripts/password-hash.sh 123

Update the returned string in the password field in the user's table for required users via command line or any MySQL (or any database systems like PostgreSQL, MariaDB, MongoDB) GUI tools.

Hope this helps! Please feel free to get in touch with us if any queries.