MagentoMagento

How To Reset Admin Password In Magento

It is assumed that you have Magento’s server access, that is database, or FTP access.

Using Database
The task of changing Magento password, by using database is quite easy. First, open your database in PHPMyAdmin. In that, open the “admin_user” table. After that, a row with your admin username will show up. You have to make a decision of two things here: NEW PASSWORD, SALT (a combination of two letters).

I am using my new secret password as “anypassword” and salt as “EF” for my case.
After that, go to any of the md5 generator sites and produce the md5 of the string “EFanypassword”. The md5 situation here is “e21ffc5b40e40077ba94c5ee63733655”.

After that, edit table line in admin_user table, for which the secret password is to be changed. In the column of Secret Password, for my case, I will be puting the md5:salt, that is “f21eeg7by0e40117bb97c5ge53733685:EF” and thereafter, save the changes. Here, you will be able to log in with the latest password through admin.

For Example :

 

Only FTP Access
This is in order to log in to Magento Admin using the FTP access. Open the class Mage_Admin_Model_User located at app\code\core\Mage\Admin\Model\User.php through FTP.

After that, locate the authenticate() fucntion on the 348th line. In it, the following code is written.

$this->loadByUsername($username);

 

 

 

 

The line return true is to be added after this; that is:

How To Reset Admin Password In Magento 3

1
$this->loadByUsername($username);
return true;

That is it. You are done. Now you can login in admin using any password. Here, we have skipped the code of password checking, Login by using any of the passwords and later, change the password in admin from the path: System -> Permission -> Users.

Read This Article: How Can Change The Default Menu Icon in Custom Module

Interested & Talk More?

Let's brew something together!

GET IN TOUCH
WhatsApp Image