As the title states, I am unable to log in to the default admin user in Magento 2.4 after installation using composer. I have tried changing the password through PHPMyAdmin using the following command:

UPDATE admin_user SET password = CONCAT(SHA2('xxxxxxxYourNewPassword', 256), ':xxxxxxx:1') WHERE username = 'admin';

as well as the following command:

UPDATE admin_user SET password=CONCAT(MD5('qXpassword'), ':qX') WHERE username='admin';

I have also tried creating a new admin user through this command line:

php bin/magento admin:user:create --admin-user='new-admin' --admin-password='!admin123!' --admin-email='[email protected]' --admin-firstname='Jon' --admin-lastname='Doe'

But I get the following error message nonetheless:

The account sign-in was incorrect or your account is disabled temporarily. Please wait and try again later.

I also tried to "unlock" the users using:

php bin/magento admin:user:unlock adminuser

Which printed

The user account "admin1" has been unlocked

But had no notable effect otherwise.

I have also tried clearing my browser cache and multiple browsers. Vivalid Chrome Edge Firefox

Any help is appreciated. Many thanks in advance. Have a great day

2 Answers 2


Execute the following SQL queries for reset your admin password

UPDATE admin_user SET password = CONCAT(SHA2(CONCAT(@salt, '!admin123!'), 256), ':', @salt, ':1'), is_active = 1  WHERE username = 'admin';

Try with

username : admin

Password : !admin123!

  • Hey thanks, that worked. But can you explain what the thought behind this command is so I can better understand it?
    – LittleDTLe
    Commented May 11, 2022 at 5:55
  • previous magento version use sh2, encrypted mechanisam for change password.
    – S.P
    Commented May 11, 2022 at 5:59
  • you will get better idea from magento.stackexchange.com/questions/137555/…
    – S.P
    Commented May 11, 2022 at 6:00
  • Thanks again, I'll definitely take a look
    – LittleDTLe
    Commented May 11, 2022 at 6:22

You need to create a new admin user and then try to log in with new user details

php bin/magento admin:user:create --admin-user=admin --admin-password=admin@123 [email protected] --admin-firstname=Admin --admin-lastname=Admin

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.