I have try this Solution but its not working....
Please give me suggestion to how to resolve this
When trying to login to the admin account in my local test setup it says: Account is temporarily disabled even I used correct user and password.

Solution 1: Unlock admin account try command in case the account is locked

php bin/magento admin:user:unlock 

Or go to Magento 2 root folder and type

php bin/magento admin:user:unlock 

Solution 2: Remove Cache var/cache

Solution 3: Remove everything, except .htaccess file from pub/static folder Open up app/etc/di.xml find the path


and replace to


2 Answers 2


The command php ./bin/magento admin:user:unlock <your-username> should work to unlock the account.

If that does not work connect to your database and check the admin_user table.

Find the user that is locked and make sure that the is_active column is set to 1 dbrow

You can also try to truncate the admin sessions table admin_user_session

Last, if none of those work, just create a new admin with the php ./bin/magento admin:user:create command. Run it with -h at the end to see the required options.

enter image description here


You can create new admin account then use that account to reset admin password with this syntax (reference source):

bin/magento admin:user:create --admin-firstname="magentip" --admin-lastname="demo" [email protected] --admin-user=magentip --admin-password=Qwe@123456

Change the following information

-admin-user: Your admin username

-admin-password: new password (should be at least 7 letters with upper+lower cases, number, symbols)

-admin-email: your admin email

-admin-firstname: first name

-admin-lastname: last name

success output:

Created Magento administrator user named magentip

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.