Resetting Admin password in Drupal 8


Option 1

drush sqlq "select name from users where uid=1"
drush upwd admin --password=pass

 

Option 2

Generate Password hash

php core/scripts/password-hash.sh 'your-new-pass-here'

Update in database

UPDATE users_field_data SET pass='$S$E5j59pCS9kjQ8P/M1aUCKuF4UUIp.dXjrHyvnE4PerAVJ93bIu4U' WHERE uid = 1;

Update cache

DELETE FROM cache_entity WHERE cid = 'values:user:1';

Comments