Can't reset Drupal admin password

user3234157 Source

I need to reset my Drupal site's admin password and I can't user the email reset because the admin email doesn't exist.

I followed the directions here:

I ran the SQL: UPDATE dr_users SET pass = md5('newpassword') WHERE uid = 1; - no luck

I also tried entering a password into the users table manually in plain text. - no luck

At this point I'm not sure what the problem is.

The only thing I can think of, and I can't see why this would be it, is that I have a browser open with Admin logged in using the old password. This seems to be a hint to my problem as I would expect that on page refresh I would get logged out as the password has now changed.



answered 5 years ago Joe T #1

try to update the admin email via mysql, then have drupal email you the password reset.
To see what you have now, you could look at the output from SQL

SELECT * FROM dr_users WHERE uid = 1;

answered 1 year ago lake #2

It is pretty easy!

With the access to the table "users" (i.e. this table can have a prefix that you have already mentioned during the installation part, so yourPrefix_ can be your project's name as mywebsitename_, and in this case you'll have mywebsitename_users) in your database via PhpMyAdmin for example.

You should alter the "pass" column associated with the "uid" column with the value 1 (i.e 1 for the admin user account).

As the encrypted value for the password: Admin_12345 is =>


You can accede to your admin account after replacing the old hashed password value stored in your database that you have totally forgotten.

Don't forget to change the password: Admin_12345 after you accede to your account ;)

comments powered by Disqus