Reset password in Drupal 6? My site is on localhost and I have access to database too. This is the structure of "users" table:



The password field is of type "varchar(32)" having collection "utf8_general_ci". I tried to decrypt the password online but it displays that password can't decrypted.

I manually updated the table and changed the password using md5 but whenever I try to login to the site as admin, it displays "Access Denied".

How to change the password for site?
Option 1 - Ask for a password reset link

If eMail is working in your site, ask for a password reset link. Use that link to then reset the password.

Option 2 - Use Drush

If you have Drush available, then you can use eiher of these Drush commands:


drush upwd --password="NewPsw" "username", to reset the password for username to NewPsw.
drush uli username, to generate a 1 time login link for username.


Option 3 - Copy an encrypted password that you know

Just copy the encrypted password from the same user table from any other user for which you know the password. Then paste that encrypted password in the record for your admin user. You should then be able to use that password for login with your admin user.

If you don't have another user yet (or don't know any of their passwords), then use standard Drupal facilities to create a new user first (and remember the new user's password).

If you don't have any user that is allowed to create new users (or you can't login with such new user), then (temporarily) create a new Drupal site and use the user/1 password of that new site.

Option 4 - Create a new admin user

Insert a new user in the "user" table (with an encrypted password for which you know the password). And make that new user an administrator also by inserting an appropriate row in the "user_roles" table (cloned from the row related to the user/1).

Then use the newly created user to perform a reset of the password for the admin user.