Magento helps to create PHP based eCommerce websites.
However, users may forget their Magento admin password or they need to change access details for security reasons.
That’s where the reset admin password Magento option is convenient.
At Bobcares, we often get requests from our Magento website owners to reset the login details as part of Server Management Services.
In this write-up, we’ll see how our Support Engineers quickly reset the Magento admin password.
Importance of Reset admin password Magento
Magento is a highly flexible platform for eCommerce websites.
Users can access the Magento admin area using the link: http://www.mydomain.com/admin.
Using this admin panel, users can easily manage the website and make modifications to the online store.
So losing the Magento admin panel password is very frustrating to Magento owners.
Therefore, retrieving the admin password is important.
How we Reset the admin password in Magento?
Users often frustrated when they forget their password or when they need to change their password because of security reasons.
But this is not a difficult task. Our Support Engineers can easily reset the password or recover the admin password for our customers.
Now let’s see the different methods used to reset the password by our Support Engineers.
5 different ways to reset the admin password.
- Use the ‘Reset password’ functionality.
- Reset password using the Magento admin panel.
- Using PHPMyAdmin
- Insert a new password using the MySQL client
- Change the password using n98-magerun
1. Use the ‘Reset password’ functionality or Email.
The easiest and quickest way to reset the Magento admin password is to request a new one through e-mail.
1. First, we browse the Magento admin panel.
2. Then we click >> Forgot your password option.
3. In the Email Address text box, we type the e-mail address associated with the account.
4. Then we click>> Retrieve Password option. Magento sends a message to the e-mail address associated with the administrator account.
5. We click the Reset Password link or browse the link from the browser.
6. Now we insert the password twice and click the Reset Password button. Finally, we test the login.
2. Reset password using the Magento admin backend
We can reset the Magento admin password from the Magento admin panel. It can be done only if the current password is known.
1. We login to Magento >> System >> My Account.
2. To reset the password first we enter the Current Admin password. Now we enter the new password twice.
3. Finally, click on Save Account to apply the changes.
Reset another user’s password
We can reset the password of users from login as Admin.
1. First we select System > Permissions > Users.
2. Now, we select the user to perform a password reset.
3. Next, we enter the admin password in the Current Admin Password field.
4. Now we enter the new password and save the changes.
3. Using PHPMyAdmin
In this case, we reset the admin password through the phpMyAdmin option.
Case1: From Admin User
1.First we login to cPanel.
2. Then we search for the phpMyAdmin option from cPanel.
3. Then we find and open the “admin_user” table.
4. After we click on the edit option.
5. We choose “MD5” in the drop-down menu.
6. Then we enter the new password and click the “Go” button.
The password has been successfully changed.
Case 2: Using SQL query option
1. We log into the phpMyAdmin from cPanel.
2. Then we select the database from the left side panel.
3. In the top bar, select the SQL tab.
Magento 1:
UPDATE admin_user SET password = CONCAT(MD5('$SALT$PASSWORD'), ':$SALT') WHERE username = '$USERNAME';
Replace $PASSWORD and $USERNAME with the details and $SALT with a random string of characters. If any table prefix is mentioned we make the changes in the query accordingly.
Magento 2:
UPDATE admin_user SET password = CONCAT(SHA2('$SALT$PASSWORD', 256), ':$SALT:1') WHERE username = '$USERNAME';
If Magento 2 uses table prefixes we make changes in the query accordingly.
4. Then click Go to execute the query.
Using this method we reset the admin password for our customers.
4. Insert a new password using the MySQL client
We change the password using the MySQL client. Our Support Engineers run the queries based on the version.
Magento 1:
mysql ${DATABASE} -e "UPDATE ${TABLE_PREFIX}admin_user SET password =CONCAT(MD5('$SALT$PASSWORD'), ':$SALT') WHERE username = '$USERNAME'"
Magento 2:
mysql ${DATABASE} -e "UPDATE ${TABLE_PREFIX}admin_user SET password = CONCAT(SHA2('$SALT$PASSWORD', 256), ':$SALT:1') WHERE username = '$USERNAME'"
We make changes in the query accordingly and execute the command.
5. Change the password using n98-magerun
Magerun is a tool for Magento development. It is a command-line utility that provides a plugin to create, edit and delete users.
Using this plugin we can easily change the password for an existing user.
Magento 1:
cd ~/public
n98-magerun admin:user:change-password <username>
Magento 2:
cd ~/magento2
n98-magerun2 admin:user:change-password <username>
This will show a password prompt and then we enter the password. Finally, we test the working from the web interface.
Need more assistance to reset the admin password in Magento? We’ll fix it for you.]
Conclusion
In short, a quick way to recover access to the Magento admin panel interface is to reset the Magento admin password. Today, we saw how our Support Engineers reset the Magento admin login.
0 Comments