simone960's picture

I wonder how to reset admin password manually when "Reset Password" didn't work.


One way to do this is with drush:


drush uli
drush upw


To use drush with Backdrop install the Backdrop Drush Extension or use a tool like Lando that includes drush with it.

drop's picture

There are also some scripts in the core/scripts directory that can help with resetting passwords.

simone960's picture

Thanks for the helpful hints ! I found a simple script provided by OSTraining meant for Drupal 7 and I try changing some api names to backdrop and it works for me. Let me know if there's any issue with this way of working or better codes to be done. Thanks !


Here the steps:

Step 1: Create a short PHP script with code below

define('BACKDROP_ROOT', getcwd());
require_once BACKDROP_ROOT . '/core/includes/';
 require_once BACKDROP_ROOT . '/core/includes/';
if (isset($_GET['pass']) && !empty($_GET['pass'])) {
$newhash = user_hash_password($_GET['pass']);
else {
die('Retry with ?pass=PASSWORD set in the URL');
$updatepass = db_update('users') 
 'pass' => $newhash,
// 'name' => 'admin',
// 'mail' => '<a href="'">'</a>;
 ->condition('uid', '1', '=')
print "Done. Please delete this file immediately!";


Step 2: Upload the PHP script to the main/root backdrop directory


Step 3: Use the PHP script from your browser address bar


Step 4: Uninstall the PHP script and login

  • One you're done resetting passwords. Be sure to uninstall the php script you created by deleting it using FTP or your file manager.


Notes: This is successfully tested on backdrop v1.8.0