Use Drush to reset a password in Drupal 7
Sometimes when you are working on your local dev, you need to reset the password of your user. With Drush you can do:
drush upwd user --password="the_password"
... where "user" is the name of the user in the Drupal DB and "the_password" is your new password.
If you are doing this on a remote or live server you may want to do:
history -c
...after you do this.
Written by Danny Englander
Related protips
2 Responses
Keep in mind that the password will be visible in your shell history. Just to be safe, follow the drush upwd command with
history -c
over 1 year ago
·
Avoid passwords on the command line altogether by generating a one-time login link:
drush uli username
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Terminal
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#