In this tutorial, we will talk about How to Add Admin User via Command Line. As you know, from Magento 2, they add many commands in bin/magento. It may be difficult to get approach with this, so let me explain about ‘How to Add Admin User via Command Line’ in more detail .
Go to Magento root folder and see the usage:
1 |
php bin/magento admin:user:create --help |
Output:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
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 For example: "MAGE_MODE=developer&MAGE_DIRS[base][path]=/var/www/example.com&MAGE_DIRS[cache][path]=/var/tmp/cache" -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 |
User: magemonkeys
Password: WeLoveMagento123
Email: hi@magemonkeys.com
First Name: magemonkeys
Last Name: Family
See the command line is:
1 |
php bin/magento admin:user:create --admin-user=magemonkeys --admin-password=WeLoveMagento123 --admin-email=hi@magemonkeys.com --admin-firstname=magemonkeys --admin-lastname=Family |
And thus we have successfully created a new admin account, it returned message:
1 |
Created Magento administrator user named magemonkeys |
[crayon-63d3df44ee522422960208/] Using above fucntion Images can be imported directly from...
Override view block using di.xml and add the below code...
You can check a list of called layout XML for...
Follow the below steps to install and set up PWA...
If you want to remove all leading zero's from order,...
Let our Magento expert connect to discuss your requirement.
We offer Magento
certified developers.
Our Magento clientele
is 500+.
We sign NDA for the
security of your projects.
We’ve performed 100+
Magento migration projects.
Free quotation
on your project.
Three months warranty on
code developed by us.