There's nothing more frustrating than updating your Drupal site only to be unable to login, and not having your admin password, therefore effectively locking you out of your site entirely. The first thing to try is to click on the lost password link, and have the password emailed to you. There is, however, a couple scenarios where this will fail to work:
In these cases, there are two ways to regain access to your Drupal site. The first resets your Drupal admin password (the password used by user 1), the second retrieves it. You'll need access to your mysql database (via phpMyAdmin, for example) for both methods, but only the first one involves executing a mySQL function.
To directly reset your password, log into phpMyAdmin and execute the following mySQL statement:
UPDATE users SET pass = md5('newpassword') WHERE uid = 1;
Enter your new password in the md5 function - it will automatically be converted via a one-way hash (this is why we can't retrieve your old password - the decryption is a one-way process). Note that for earlier versions of Drupal you may need to use SET password, instead of SET pass.
This will effectively reset the Drupal admin password for user 1. Note that you can use this to reset the password of any user, although this is typically unnecessary as you should be able to simply log in as admin user (user 1), under which you have the ability to reset any user's password.
An alternative to resetting the password is to retrieve it. This method only applies to the second problem above, that is, you are able to access the retrieve password page, but you're email address is outdated. To do this, simply update the email field for the admin user (user 1) in the "users" table. Unlike the password field, you can directly edit the email field without consequence. Once you've updated your email address for the admin user, simply go to the request password page to have your password emailed to your email address.
All Content © 2005 - 2008 Contract Web Development, Inc. All Rights Reserved. Privacy Policy | Terms of Use | Powered by Drupal
3 days 11 hours ago
3 days 12 hours ago
3 days 12 hours ago
3 days 15 hours ago
1 week 8 hours ago