Recover a Lost Password on a Local Magento Site
This should, obviously, only be done on a local development site and not in a production environment. If you're like me you have a lot of development sites and databases. Occasionally I'll come back to one and for one reason or another not know the password. This is a quick and easy way to recover it by temporarily setting the admin console log in page to automatically authenticate you.
Go to the login page template at `app/design/admin/default/template/login.phtml`. Anywhere on the page add the follow line:
<?php setUser( Mage::getModel('admin/user')->loadByUsername('ADMIN') ); ?>
Replace `ADMIN` with your username. Visit the login page then refresh it again and you’ll be logged in. Change the password, unlock the account if needed then make sure to remove the code from the login template.