Independence Day Offer. Save 25% on Magento Hosting. Sign Up Now.

How to Unlock Magento 2 Admin User Account?

Unlock Magento 2 Admin User Account

Are you looking to unlock Magento 2 admin user account?

Magento admin accounts can get locked due to multiple reasons. The most common cause is entering the wrong username and password many times. Also, someone else logged in with admin access can lock the account.

Sometimes the Magento website shows signs of infection; hence, hosting companies lock the login to the store. No one can log in, and the company can prevent the spread of infection and clean the store.

Unlock Magento 2 Admin User Account

In this quick tutorial, we will learn to unblock admin user accounts in Magento 2.

How to unlock Magento 2 Admin User Account?

There are two ways to unlock Magento 2 admin user account:

  1. Using another admin account
  2. Running a CLI command

#1 Using another admin account

Another admin can unlock the locked Magento 2 admin account. That is one reason to have multiple Magento 2 admin accounts.

You can view all the locked accounts under the Locked Users grid. If you have access to the store through many admin accounts, you can use anyone to unlock the original admin account.

Follow the steps to unlock the account:

  1. Open the Magento admin panel
  2. Navigate to the System > Permission > Locked Users
  3. Find the locked account in the Table
  4. Select Unlock from the dropdown options
Unlock Magento 2 Admin User Account

Finally, press the Submit button to unlock the account.

#2 Unlock Admin Account using CLI

Follow the steps to run the CLI command to unlock the admin account:

  1. Connect the server through SSH
  2. Navigate to the Magento root directory
  3. Run the following command:
$ bin/magento admin:user:unlock {username}

Replace the {username} with the locked admin username. The account will be unlocked, and you will see a success message. 

But if the message says that the account was not locked and cannot be unlocked, you have to check whether the {username} is on Magento 2.

If the user does not exist, the Magento message will tell you. Verify the account exists and is active before unlocking the account.

Wrap Up

Magento is a powerful ecommerce platform. There are many security features, and one such feature is locking an admin account when it suspects unauthorized activities.

Besides locking the admin account, you can also set up the number of failed login attempts before Magento locks the admin account. You can add the captcha or security question to the login page.

In this tutorial, we learned to unlock the Magento 2 admin user account. If you encounter any issues while implementing the solution, please leave them in the comment section.

Latest Magento Tips, Guides, & News

Stay updated with new stuff in the Magento ecosystem including exclusive deals, how-to articles, new plugins, and more. 100% Magento Goodness, a promise!

Leave a Comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Scroll to Top

Talk to a sales representative

USA / Worldwide

+1.714.2425683

India

+91.9852704704

We can help you. Right now.

Fast growing merchants depend Breeze for high-performance hosting. Experience counts. Let's get started.

Request demo

Please fill in the details below and we’ll reach out to you with a customized demo of our product!

Get your FREE Image SEO Checklist

Bring more visitors to your image from Google search from the existing images.