Sometimes, whether in testing or other situations, you need to reset a password (often the admin password) for a Drupal site.
Edit: The shortest answer is that two wonderful options are built into drush!
# Get an admin login link
# Set the password for any user
drush upwd admin --password="newpassword"
The latest versions of drush have
drush uli which just gives you a one-time login link for admin.
Unfortunately it doesn’t get the hostname right in most cases (probably there’s no way to know it if base_url is not set) so you have to change "default" correct hostname.
So in the case above, I would paste the link into a browser and then change it to
There I have a one-time login link to user 1 on the site. Works flawlessly.