简体   繁体   中英

password recovery for drupal

i forgot my drupal user id and password . Is there any way to recover it

http://example.com/<path-to-drupal>/user/password should bring you to a page where you can request a reset/new-password.

Edit : The above path applies if you have ' clean URLs ' enabled, if not use http://example.com/<path-to-drupal>/?q=user/password

This solution is valid for Drupal 5 or 6 but not for Drupal 7. This version does not use a standard hashed password. You can get your encoded password 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 that you should use in the database to update the admin password. You can use the following SQL query to update the Drupal database.

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

If you don't have access to the email (or want to bulk-update the passwords) you can update the database with a query like:

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM