How to Manage Admin Users Using CLI in Magento 2

Published Oct 06, 2017
How to Manage Admin Users Using CLI in Magento 2

Magento 2 CLI has many commands to manage it.
If you have issues with your admin user, you can manage them via CLI (Command Line Interface).

Create New Administrator User

To manage admin users in Magento 2, you can use following command:

php bin/magento admin:user:create --admin-user="adminuser" --admin-password="adminuser@321" --admin-email="admin@admin.com" --admin-firstname="Admin" --admin-lastname="User"

NOTE : make sure to change parameter values

Unlock an administrator account

You can use following commands to unlock an administrator account that was locked:

php bin/magento admin:user:unlock adminuser 

Here, adminuser is the username for an admininstrator account.

Discover and read more posts from Amit Samsukha
get started