Drupal password recovery

i forgot my drupal user id and password . Is there a way to restore it

+2


source to share


3 answers


http://example.com/<path-to-drupal>/user/password

should take you to a page where you can ask for reset / new-password.



Edit : The above path applies if you have included "clean urls" if not usinghttp://example.com/<path-to-drupal>/?q=user/password

+13


source


This solution is valid for Drupal 5 or 6, but not Drupal 7. This version does not use a standard hashed password. You can get your encoded password by running the following command:

php /path_to_drupal_files/scripts/password-hash.sh your_password

      



Then you can see your password hash. This is the string you should use in the database to update the admin password. You can use the following SQL query to update your Drupal database.

UPDATE users SET pass='YOUR_PASSWORD_HASH' where uid=1;

      

+4


source


If you don't have access to the email (or you want to increase the number of passwords), you can update the database with a query like:

Users UPDATE SET pass = md5 ('NEWPASSWORD') WHERE name = 'admin'

+3


source







All Articles