Magento 2 provides different ways to create an admin account/user, we can create a new admin user from the admin panel and via the command line (CLI). Here is how to do it via CLI.
To create an admin user, Go to Magento 2 root folder, run the command:
php bin/magento admin:user:create
It will ask you: username, password, email, first, and last name. Fill all the details and the user will be created successfully.
For more information about the above command, you can use
php bin/magento admin:user:create --help
Usage:
admin:user:create [options]
Options:
–admin-user=ADMIN-USER | (Required) Admin user |
–admin-password=ADMIN-PASSWORD | (Required) Admin password |
–admin-email=ADMIN-EMAIL | (Required) Admin email |
–admin-firstname=ADMIN-FIRSTNAME | (Required) Admin first name |
–admin-lastname=ADMIN-LASTNAME | (Required) Admin last name |
–magento-init-params=MAGENTO-INIT-PARAMS | Add to any command to customize Magento initialization parameters |
-h, –help Display this help message
-q, –quiet Do not output any message
-V, –version Display this application version
–ANSI Force ANSI output
–no-ANSI Disable ANSI output
-n, –no-interaction Do not ask any interactive question
-v|vv|vvv, –verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
Help:
Creates an administrator
No comments:
Post a Comment