Create/Edit Magento 2 Admin User Account via CLI

You can create or edit Magento 2 admin user account using the command line.

For that, you have to open terminal/command prompt.

After that go to you’re Magento site’s root directory in the terminal, for example, your Magento site can be in folder/directory path as /var/www/html.
So go to that directory from command line and after that execute the below command.

php bin/magento admin:user:create --admin-user='new-user' --admin-password='admin123' --admin-email='admin@admin.com' --admin-firstname='Admin' --admin-lastname='Admin'

Once the Magento 2 admin user account is created then you will see the below success message.

–admin-user-> Admin account username (required).
–admin-password-> Admin User account password (required).
–admin-email-> Admin user account’s email address (required).
–admin-firstname-> Admin user’s first name (required).
–admin-lastname-> Admin user’s last name (required).

Note: If you are editing an existing user then only the first name, last name, and password can be edited.

Hope it will help you. Thank you.

. . .

Comment

Add Your Comment

Be the first to comment.

css.php