How To Reset Drupal 7 Password from Within the Database

On occasion, you may be hired to take over the code on a Drupal 7 application where the previous site administrator has not provided the needed credentials to administer the site.

As the new developer, you will likely have the credentials for the database. If you have access to the database there are a few ways to do this.

One of the simplest ways is to replace the hash of the existing admin’s password, with the hash for word ‘password’.

Here is the hash for ‘password’ (without the quotes)


After updating the users table, you can now log in with the administrator’s username and the pasword as ‘password’.

Now you can administer the site and update the passwords as needed.

For other ways to do this, go to “How to reset admin password with D7?”

Leave a Reply

Your email address will not be published. Required fields are marked *