1

I have checked 'admin' user's status is currently 1 which means its active. I have tried to retrieve password via email also but I have not received any email may be because I am hosting in local.

I have reset the password from sql using below query

 update users set pass = md5('mynwepass') where uid = 1;

It seems like it updated the password but Drupal isn't recognizing my new password. I have repeatedly tried and my admin id got blocked temporarily and then I truncated the flood table to let me retry. But still it doesn't recognize my credentials.

Is there any other option left other than reinstall Drupal?

3
  • What version of Drupal you are using? – samir chauhan Jan 15 '14 at 8:01
  • To activate mail system in local host, open the php.ini and set "SMTP = mail.example.com" . configure the smtp, so that you can get the email. – Bala Jan 15 '14 at 8:05
  • i am still not receiving emails. my outgoing server require authentication. any more settings to be done? – Dudepal Jan 15 '14 at 8:12
2

Drupal does not store passwords as md5. It is salted hash now, to prevent rainbow attacks.

If you need to be able to manually set password, without a need for working mail system, your best bet is to use Drush - a command line shell and scripting interface for Drupal.

drush user-password someuser --password="correct horse battery staple"
1

You better change your password:

<?php
/**
* @file
* The PHP page that serves all page requests on a Drupal installation.
*
* The routines here dispatch control to the appropriate handler, which then
* prints the appropriate page.
*
* All Drupal code is released under the GNU General Public License.
* See COPYRIGHT.txt and LICENSE.txt.
*/
/**
* Root directory of Drupal installation.
*/
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('givenpassword');
die();
menu_execute_active_handler();
?>

after changing the pass delete that lines which are responsible to change password. You can see the solution by this link: Reset admin password

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.