put the following code in drupal root directory and then change the $pwd value to your desired password and the visit this file in browser and you will a hash password and update it direclty in databse
as
UPDATE users SET pass = '[hash]' WHERE uid = 1;
in my case uid was 1 .
<?php
$pwd = 'password';
define('DRUPAL_ROOT', getcwd());
require_once DRUPAL_ROOT . '/includes/bootstrap.inc';
require_once DRUPAL_ROOT . '/' . variable_get('password_inc', 'includes/password.inc');
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
header("Content-Type: text/plain; charset=utf-8");
echo user_hash_password($pwd);
?>
source : http://drupal.org/node/865818