How to reset Drupal password for a large number of users

If you need to mass reset the password for some of your Drupal users, drush can help you. The drush command to reset a user's password is: drush upwd username --password="newpassword" Now, let's say you need to reset 150 user's passwords. 1) Create a file named accounts.txt with all usernames you want to reset (one per line) 2) Run the following command: while read line; do drush upwd "$line" --password="newpassword"; done < accounts.txt Enjoy. ...