Drupal Answers is a question and answer site for Drupal developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How do you Drush reset an administrator password after forgetting the pass and losing its email?

share|improve this question
up vote 17 down vote accepted

You can execute drush uli, this will generate a one time login link. By default it provides one-time login link for administrator.

If you execute drush uli some-username, this will generate one time login link for that user.


You can also use drush upwd for updating the password. Use it like this drush upwd --password=<new password> <some-username>

share|improve this answer

$ drush help user-password (Re)Set the password for the user account with the specified name.

Examples: drush user-password someuser --password="correct horse battery" Set the password for the username someuser. @see xkcd.com/936

Arguments: name The name of the account to modify.

Options: --password= The new password for the account. Required.

Aliases: upwd

share|improve this answer

If you have ssh access to the server, cd to the drupal root directory and run:

drush upwd --password="myNewSecretPassword" "admin"

Source: https://www.drupal.org/node/44164

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.