I lost my Drupal password, how do I get access again?
Let’s pretend you don’t have access to the email for the main Admin user for a Drupal site. But, you DO have ssh access.
To create a temporary password follow these steps to regain access to your site.
Step 1: ssh into the server
Step 2: become the super user
Step 3: change directories to be in the httpdocs (or wherever your main site root directory is.)
Step 4: type the drush uli command
Step 5: in response, you’ll get a URL which you should copy and paste in the browser.
Step 6: make your temporary password, and you’ll have access to the drupal backend of the site.