create new file “password.php” on root dir and add following code

define('DRUPAL_ROOT', getcwd());
require_once DRUPAL_ROOT . '/includes/bootstrap.inc';
require_once DRUPAL_ROOT . '/includes/password.inc';
echo user_hash_password('test'); 

run password file i.e drupal/password.php

copy the output and go to database open users table
replace existing password with output and relogin

Advertisements