How to Reset Drupal Admin Password

Drupal is a Content Management System that is Open Source so it is free to use for any purpose. Drupal also got some interesting achievements. Drupal was selected as the overall winner in the Open Source CMS Award 2007 Packt Pub and CNET Webware 100 award gives an overview of the success in the world of Drupal websites. Starting from May 2007 until April 2008, Drupal has been downloaded over 1.4 million times. The number of downloads increased 125% each year.Many large sites that use Drupal as MTV UK, Vocalo.org, SpiritLibrary.com, Drigg and others.

Dries Buytaert  is the person who is the founder of this great CMS. His initial Drupal is not an open source CMS, but in 2001 Dries Buytaert make Drupal as an open source project. Using open source license makes a lot of developers to freely download, use for business purposes, as well as changing the structure of Drupal freely. Drupal capabilities are modular and very tough to make a lot of parties can contribute freely. Over time, Drupal’s growing rapidly. Dries Buytaert who understand the business and open source collaboration, began exploring the potential within Drupal. This time it will be discussed how to reset password in Drupal 7.x. Slightly different from previous versions of Drupall can easily reset user password just by changing the field “pass” on the table “dr_users” with md5 generated code results. 
For Drupal 7.x versions vary slightly due memutuhkan generate the hash code of its own, to do so may follow the following steps:

  • The first thing to do is log into cpanel and click on PHPMyAdmin, open the database and select the table dr_users Drupal.
  • The next step to create a script to get the password hash code for Drupal. Go into the Directory Drupal installed, eg home / public_html / drupal directory is created in the new file with the name ubahpass.php.
  • Then look following script;

    <? Php 
    define (‘DRUPAL_ROOT’, getcwd ());

    require_once DRUPAL_ROOT. ‘/ Includes / bootstrap.inc’; 
    require_once ‘includes / password.inc’; 
    echo user_hash_password (‘passwordbaru’); 
    die ();

    To echo user_hash_password (‘passwordbaru’);

    From your browser run ubahpass.php file is open when following these steps https://yourDomain.com/drupal/ubahpass.php .

  • There will be a result hash code, copy the hash code and duplicate your drupal database table dr_users to pass field and record desired, eg admin . If it is then just click the GO button at page bottom.
  • By following the steps above it will get a new password for the user admin. Good luck.