Is it possible to change a user's Drupal password with Drush?

7.4k views Asked by At

Is it possible to change a user's Drupal password from the command-line with Drush?

3

There are 3 answers

1
jhedstrom On BEST ANSWER

If you're running Drupal 7, using md5 won't work as passwords are salted. However, if you have drush 4.x, you can use the user-password command:

drush user-password someuser --password="gr3@tP@$s"
0
Fitz On

Yes. Here's an example for resetting the password of the Drupal admin user given that you know the UserID (uid):

drush sqlq "update {users} set pass=md5('new_password_here') where uid=1"
1
Iti Jha On

The Command goes like this:

drush user-password someuser --password="New Password-of yours"

You can change through Drsuh term