Drupal 8 → Reset any User's password

Submitted by donmc on Fri, 06/16/2017 - 23:06

Many thanks to Tony Mucci for this simple solution for Drupal8 Passwd resets:
From: https://medium.com/code-kings/drupal-8-how-to-manually-reset-an-admin-p…

Drupal 8 → Reset a user password

  1. Log into Mysql (I used phpmyadmin for all SQL steps) and go to your Drupal’s schema
  2. Find the users_field_data table
  3. Find the user that is related to you.
  4. Log into your terminal
  5. Go to your Drupal main directory
  6. Run this command:

    php core/scripts/password-hash.sh “NewPasswordHere”
  7. Don’t forget the quotes in the above example
  8. It will create a hash you can use in your database.
  9. Go back to your DB table
  10. Replace the pass value with your new hash. Save/update your
    table’s row.
  11. Go to flood table in DB
  12. If you are running a non-production server, simply truncate
    this table, otherwise look for anything that is flagging your IP
    with logging in. delete those records.
  13. Go to cache_entity table in DB
  14. If you are running a non-production server, simply truncate
    this table, otherwise look for anything that is flagging your IP
    with logging in. delete those records.