We use cookies
We use cookies to optimize our website. By continuing to browse the site, you agree to our use of cookies.
Control panel
  • Русский
  • Українська
  • English
  • UAH
  • USD
  • RUB
  • EUR
  • 0-800-307-307 Hotline
  • +38 (044) 392-74-33 Kiev
  • +38 (057) 728-39-00 Kharkiv
  • +38 (056) 794-38-31 Dnipro
  • +38 (032) 229-58-93 Lviv
  • +38 (048) 738-57-70 Odessa
  • +38(093) 170-15-42  Life
  • +38 (067) 400-88-44 Kievstar
  • +1(888)393-24-51  USA, Toll free
  • +44(131)507-01-14  Great Britain
  • +7 (499) 348-28-61 Moscow

2.13.5.4. Changing admin password in Drupal

To change the admin password in Drupal:
  1. In the site config file take a look the name of the database to which it is connected.
  2. Discover database in phpMyAdmin.
  3. Execute the following SQL query, specifying instead of new_password New password:
    UPDATE `drupal_user` SET pass = MD5('new_password') WHERE uid = 1;

    If the names of the tables in the database do not start with the standard drupal_, and with a different prefix, make the appropriate change to the SQL query.

  4. Check the login to the admin panel.
To change the admin password in Drupal:
  1. IN site root directory create a PHP script with content by specifying instead of new_password New password:
    script.php
    <?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('new_password');
    die();
    menu_execute_active_handler();
    ?>
  2. Execute the script in the browser and you will be shown the password hash code.
  3. In the site config file take a look the name of the database to which it is connected.
  4. Discover database in phpMyAdmin.
  5. Execute the following SQL query, specifying instead of hash_password the hash code obtained as a result of executing the script:
    UPDATE `drupal_user` SET pass = '$hash_password' WHERE uid = 1;

    If the names of the tables in the database do not start with the standard drupal_, and with a different prefix, make the appropriate change to the SQL query.

  6. Check the login to the admin panel.