How To Create Admin User Using Command Line Interface in Magento 2

As you know, we can also create the admin users with any role from admin. But if, in case, you want to create new admin user using command line interface, you need to use the following command.

This is the command for adding new admin user:

php bin/magento admin:user:create --admin-user="username" --admin-password="password" --admin-email="admin@example.com" --admin-firstname="First Name" --admin-lastname="Last Name"

Please make sure to put proper information for username, password and email id. Please do not use existing email id and username, try to use new email id and username.

That’s it. You are all set to create new admin user using CLI.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s