after installing magento in my local machine I forgot admin password what I have given. I am not able to login to my admin area how can I reset the password
I have read
The way I usually do it is as follows:
Add this snippet somewhere in your login.phtml template app/design/adminhtml/default/default/template/login.phtml
Mage::getSingleton('core/session', array('name' => 'adminhtml'));
$user = Mage::getModel('admin/user')->loadByUsername('YOUR_USERNAME');
$session = Mage::getSingleton('admin/session');
$session->setUser($user);
Replace 'YOUR_USERNAME' with your admin user name.
Go to the login page (yourdomain.com/admin), now your admin session has been set.
When you go to the login page again, you should be automatically logged in. Now you can reset your password in system > permissions > users
.
Don't forget to remove the snippet from your template once your are logged in.
It might not be the best answer but it has always worked for me.