One of my developer left the drupal project in middle, he didn’t told me the drupal admin password.After long search i get the code to reset drupal 7 admin password.This trick will works if you have access to ftp and database of your server.
well in previous version of drupal you can easy reset the password using md5 hash but in drupal 7 it use salted sha512 hash, so to get salted sha512 hash of your password you need to follow some steps
Steps To Reset Drupal 7 admin password
- Create a reset.php with your text editor or developer ide.Place the content write below in it.
1234567<?php define('DRUPAL_ROOT', getcwd());require_once DRUPAL_ROOT . '/includes/bootstrap.inc';drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);require_once 'includes/password.inc';echo user_hash_password('my_new_password');die();menu_execute_active_handler(); ?>
Replace the “my_new_password” with the password you want to set.
- Upload this file in root of your drupal project.
- Access this file from browser.You will get the hash of your password.
Copy the password hash.
- Open phpmyadmin. Goto your drupal database.
if you don’t know what database your drupal is using then open configuration file at
sites/default /settings.phpand find database name in $databases variable.
After that either execute the following query1UPDATE users SET pass = md5('password hash') WHERE uid = 1;
or proceed further.
- Click on the users table.
edit the admin row.
- Paste the password hash in pass field.
Now Login With Your New Password
Incoming search terms:
- admin site hash password
- drupal 7 password hash generator
- drupal 7 reset admin password mysql
- reset drupal 7 admin password mysql
- resetear el password en drupal 7
- udpate drupal7 password
- how to generated a salted pass to write into db for drupal 7
- unlock password in drupal 7
- how to connect c# to drupal 7
- how to check the admin pasword in database in drupal
- how to change mysql root password using c# code
- how to change drupal 7 username and password using mysql in drupal 7
- how to change a Drupal user password in mysql
- form id of change password in drupal7
- how to login in drupal as admin using database change
- How to reset drupal user account offline
- reset drupals admin theme using mysql / database
- reset drupal 7 password on local host
- java mysql password hash
- reset admin drupal 7
- reset admin access drupal
- password reset form id in drupal7
- md5 hash drupal7