For some X or Y reason, the Magento 2 Administrator password reset process may not work. In this case, you have many other possibilities that you can try. In today’s article, we will discuss four different approaches to reset the Magento 2 Admins password. Whether you’re a developer or a store, you don’t have to stay off your dashboard Magento. By the end of the article, you will understand how to use the standard procedure (reset the email link) or reset the database.
There are many scenarios in which the current article can help. Here are a few :
Either way, you can try any of the suggestions below to get to your dashboard.
You can have more than four approaches, but trying one of the suggestions below may help.
If your Magento 2 website has more than one admin, you can use the other admin password to reset your password. In this case, you can ask the second administrator to log in and help you with the procedure. Here are the steps to follow:
Another way to reset a Magento 2 administrator password is to go to the administrator login page. In this case, you can follow the steps below.
'backend' => array ( 'frontName' => 'adminccldd', ),
If “adminccldd” is your dashboard bar, then you will have something like “https://yourURL.com/adminccldd.”
If you can’t get the reset link in your email, or if you don’t have more than two admins on your site, you can do it right from your database. Here is how to do it.
The key looks like this:
'crypt' => array ( 'key' => 'd10075ee37ff3f6dddssdlldac352773a029', ),
UPDATE prefix_admin_user SET password = CONCAT(SHA2('keyNewPassword', 256), ':key:1') WHERE username = 'myusername';
UPDATE mag2_admin_user SET password = CONCAT(SHA2('d10075ee37ff3f6dddssdlldac352773a029NewPassword', 256), ':d10075ee37ff3f6dddssdlldac352773a029:1') WHERE username = 'myusername';
In most cases, all three of the above methods would work. You may not have a second administrator, the mail system is not working, and you do not have access to PhpMyAdmin. If so, the command line will help. In this case, the approach will create a new administrator login that you can use to access the dashboard. Once you’re in your dashboard, you can either reset your password or delete the previous user. Here are the steps you need to follow:
You will have something like this:
admin admin:user:create Creates an administrator admin:user:unlock Unlock Admin Account
php bin/magento admin:user:create
It will ask you to provide a username, password, email address, last name and first name.
After providing all of this information, clear the cache.
php bin/magento cache:flush
If you follow all the steps, you will be able to log into your Magento 2 dashboard as an administrator.
The procedure for resetting a Magento 2 Admins password is not always easy. However, if you can use one of the methods given, you can try another.
Thank you for taking the time to read our article. If you like the article, you may also be interested in “6 Different Approaches to Resetting a WordPress Password”.