- Web templates
- E-commerce Templates
- CMS & Blog Templates
- Facebook Templates
- Website Builders
Drupal. How to reset admin login details
July 10, 2012
In this tutorial you will learn the way to change admin password in case you have problems locating it.
1) First of all you should create new file and put the following script in there:
<?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('admin'); die(); menu_execute_active_handler(); ?>
Replace ‘admin’ with the password you need.
2) Save this file as php file on your server, in Drupal root folder, e.g. reset.php
3) Now open this file on your server at http://wwww.yourwebsite.com/reset.php and you should get hash code similar to this one:
$S$DMNPfKMxzmGB6wQZtxuVDF3uSqZef8aBRrUJLKfJHdXwfaUjh3zB
4) Copy the code and open your PHPMyAdmin tool, browse “Users” table, then you need to edit ‘admin’ entry:
Paste your new hash code into “pass” field and save the changes:
5) Now open your website and enter new password – it will work properly.
And the most important – you should remember that your website is not secure until you change password in admin panel
Feel free to check the detailed video tutorial below: