Magento Tutorials

How To Unlock Admin User In Magento 2

Hello Magento Friends,

Today I will discuss How to Unlock Admin User in Magento 2.

Your Magento 2 store may have two or more admin users. Admin users are created to assign different tasks to the members of the team. Learn How to Create New Admin User in Magento 2.

You are trying to login into the admin panel but are unable to log in and receive the below error.

This is because you have been locked by the Magneto system due to some problem or incorrect details.

For safety reasons, the Magento admin user is automatically locked after six login failures. The locked users are seen on the locked user grid of the admin form. Another admin user with administrator permissions can unlock the locked admin user.

After the failure of 6 attempts, the user is locked by the Magento system. So here I will be explaining how to unlock admin users in Magento 2.

How to Unlock Admin User in Magento 2?

You can unlock the admin user in Magento 2 in two ways – Command line and Admin Panel. Here I will explain both ways in detail.

Method 1: Command Line

If you want to unlock the Admin user using Command Line then use the below command

Unlock Admin User Syntax :

php bin/magento admin:user:unlock [username]

Unlock Admin User Example :

php bin/magento admin:user:unlock magecomp

Unlock Admin User Output :

—> If the admin user is successfully unlocked, you can see the output like this:

The user account “magecomp” has been unlocked

—> If the admin account is either not locked or if there was a problem, the output will be like this:

The user account “magecomp” was not locked or could not be unlocked.

—> If the admin account doesn’t exist, you can see the output like this:

Couldn’t find the user account “magecomp”.

Unlock Admin User Help :

If you want help regarding how to unlock admin users using the command line then use the below command.

php bin/magento admin:user:unlock --help

Method 2: Magento 2 Admin Panel

Step 1: From the Admin Panel, move to System -> Permissions -> Locked Users

Step 2: You will get a list of locked users if any. Select the user you want to unlock by clicking on the checkbox. Select actions as Unlock and then click the Submit button.

Closure:

This was all about unlocking admin users in Magento 2. You can also get all admin user data in observer in Magento 2. You can even prevent any unusual changes from the backend by an admin user with the help of Admin Actions Log Extension for Magento 2.

If you are still unable to unlock the admin user, reach out to me via the comment section and I will help you solve the problem you are facing. Share the solution with your friends who are dealing with the issue of locked admin users.

Happy Reading!

Click to rate this post!
[Total: 3 Average: 5]
Gaurav Jain

Gaurav Jain is Co-Founder and Adobe Certified Expert-Magento Commerce Business Practitioner. Being Computer Engineer👨‍💻 and possessing Extensive Marketing skills he handles all kinds of customer Queries and his Happy😀 & Helping🙏 Nature makes customer's day Delightful. When he isn’t working, you’ll find Gaurav Reading on Books📖 or Traveling🚗. Also, he is Speaker at Magento Meetups.

Recent Posts

How to Integrate ChatGPT with Laravel Application?

In this guide, we'll explore how to integrate ChatGPT, an AI-powered chatbot, with a Laravel…

1 day ago

What are Net Sales? How to Calculate Your Net Sales?

In the world of business, understanding financial metrics is crucial for making informed decisions and…

4 days ago

Magento 2 Extensions Digest April 2024 (New Release & Updates)

Welcome to the MageComp Monthly Digest, where we bring you the latest updates, releases, and…

4 days ago

The ABCs of Geofencing: Definition, Features and Uses

In this era, businesses are always on the lookout for ways to engage with their…

4 days ago

How to Delete Product Variant in a Shopify Remix App using GraphQL Mutations?

Managing a Shopify store efficiently involves keeping your product catalog organized. This includes removing outdated…

5 days ago

6 Innovative Tools Revolutionizing E-Commerce Operations

E-commerce has transformed the way consumers shop for products and services and interact with businesses.…

1 week ago