We will see how to change the Magento admin password through the database, In case if registered email for admin is not accessible and admin user not able to get the reset link because of mail not accessible then you can follow these steps to change the Magento admin password.
Steps:-
Run this query into respected DB of Magento
UPDATE admin_user SET password = CONCAT(SHA2(‘xxxxxxxNewPassword’, 256), ‘:xxxxxxx:1’) WHERE username = ‘admin’;
NewPassword = enter your custom password(where NewPassword is your custom password for Magento admin account).
Where The xxxxxxx character sequence is a cryptographic salt, it is saved in app\etc\env.php file
<?php return [ 'backend' => [ 'frontName' => 'admin' ], 'crypt' => [ 'key' => '49d78c991b6c99ed48d046ec614d20cc' //cryptographic salt ],
After the password changed and try to login with a new password and if you are getting the error message (The account sign-in was incorrect or your account is disabled temporarily. Please wait and try again later.)
Then run these command in Magento root directory:-php bin/magento admin:user:unlock adminusername
and try to login again.
Thanks 🙂.
Be the first to comment.