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 this article http://www.atwix.com/magento/reset-admin-password-mysql/ but it is not working for me. Or may be I am not getting this
please help me am a beginner of Magento
3 Steps without MySql
To login into magento admin, using only ftp access is a little tricky.
Step 1 :
open the class Mage_Admin_Model_User located at
app\code\core\Mage\Admin\Model\User.php
.Step 2 :
Next find the
authenticate()
function aroundline no: 225
. Inside the authenticate function, this code is written,You need to add the line
return true;
after this,Step 3 :
And that’s it, now you login in admin using any password. Since, we have skipped the code for password checking, login using any password and then change the password in admin from
System -> Permission -> Users.
Follow the below procedure to reset Magento User Password:
1) Login to PhpMyAdmin.
2)Open Magento Database.
3)Now open "admin_user" table if you not set any table prefix at the time installing Magento, Or if you set table prefix then open "prefixadmin_user" Table.
4)Now in User password field you can see MD5 Hash converted password. So first you need to convert your plain text into MD5 Hash format and after that copy the MD5 Hast format password and paste it in User Password field under "prefixadmin_user" database table.
Go To :
1 - Login in to PhpMyadmin .
2 - Jump in to Magento's database .
3 - Go to admin_user table and edit the table .
4 - put a "password" (which you want) and select MD5 from function dropdown (Important).
This is working both in CE And EE latest version (tested in both latest version), no need of core file changes.
Mostly, when we install the Magento Community on our local computer (XAMPP, WAMPP), it looks like we can't log in as the administrator from the backend. The system will prompt us we input the wrong password, but it's not the truth.
When i come up with this issue, i tried to reset the password by following method (in SQLyog).
‘password’ should be set to whatever you want for your new password, and ‘qX’ would be any random characters you like.
But we still can not log in. At first, I thought this method is wrong method. While, the 'admin' password definitely had been changed. But why we still can not log in?
Maybe we have input the right user name and password, but we still can't log in.
Use Notepad ++ to open and edit core file: app/code/core/Mage/Core/Model/Session/Abstract/Varien.php, within your magento directory and comment those below lines:
And try again, you should can log in as admin from the backend.
The problem is Localhost or "127.0.0.1" are not true domains, and browsers allow only real domains to store cookies, that's why login stops and with invalid Username or Password.
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
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.
To reset your admin password, you have to create a file and paste the bellow code into this file and upload it in your magento root directory.
And that’s it, now you are able to login from admin using by this given password.
For detail about reset admin password, Please go to my blog link http://www.scriptlodge.com/how-to-reset-admin-password-in-magento/