How to reset admin password in Drupal 7?


Did you forget your admin password of Drupal 7?.
Well, this solution might help you to reset the password. The only thing you need is the database access of your server.

Now, lets see how we can reset the password.

Step 1: Connect to your database and fetch the ‘users’ table.

select * from users where name = 'agur';
My admin username is ‘agur’, yours could be different.

Screenshot showing the fetched result of the above query, you can see the ‘pass’ column marked in black. All you have to do is to update the password field with the below string (hash).


The above string is nothing but the hash for text ‘test’. Now let’s update the ‘pass’ column with the above string, so you can login into the drupal admin panel using the password ‘test’.


Now, the password is reset to ‘test’. Let’s login to the admin panel.


Hoorah, you have successfully had reset the password, once you login in to the admin panel don’t forget to change the password.

Enjoy the day!

Leave a Reply

Theme: Overlay by Kaira