“There’re many times that I have problems with accessing Magento 2 admin panel.” It can be seen that the number of systems and websites along with number of passwords which we use daily makes us forget one easily or at least few of them. This is a basic question we had during the processing development Magento.
And you? Have you ever had any troubles relating to Admin User such as losing your admin credentials or creating an Magento 2 admin user and so on?
If your answer is “Yes”, the useful article totally is yours. Check it out!
1. Via Admin Panel
Magento 2 configuration allows you to create admin user accounts as many as you want and they will be set in dissimilar access level if you require. You will find all the information that you need in this detailed tutorial.
- Step 1: Configure User Information
- Step 2: Determine User Role
Step 1: Configure User Information
Navigate from Admin panel, choose System => Permissions => All Users. Then, click Add New User button.
From here, in the Account Information section, you can create your admin user:
Fill in the required field, note that:
- User Name field: enter the user name for account. This part is not case-sensitive.
- Email field: the email address must be unique.
- Password and Password Confirmation must be similar, contain more than seven characters and include both letters and numbers.
- Interface Locale field: select the language to be used for the Admin interface if the store has multiple languages.
- Set to Active in the This Account is field.
- Current User Identity Verification section: enter your password in Your Password.
Step 2: Determine User Role
In the panel on the left, choose User Role. All existing roles will be listed. Initially, the only role available is Administrators.
From the Assigned column, pick Administrators option then click Save User button to complete.
2. Via Command Line
Run this command to create Magento 2 admin user cli:
php bin/magento admin:user:create --admin-user='new-admin' --admin-password='!admin123!' --firstname.lastname@example.org' --admin-firstname='Bss' --admin-lastname='Test'
Remember to make sure that you have already passed through to the Magento 2 directory before you run this command.
Once the new Magento 2 administrator account has been created, you will see the following success message:
Created Magento administrator user named new-admin alread.
If you forget and want see all the parameter, you can execute the following command:
php bin/magento admin:user:create –help
|–admin-firstname||Magento administrator user’s first name.||Yes|
|–admin-lastname||Magento administrator user’s last name.||Yes|
|–admin-email||Magento administrator user’s e-mail address.||Yes|
|–admin-user||Magento administrator user name.||Yes|
Magento administrator user password
The password must be at least 7 characters in length and must include at least one alphabetic and at least one numeric character.
We recommend a longer, more complex password. Enclose the entire password string in single quotes. For example, –admin-password=”A0b9%t_3g’.
There are a few ways that allow you to create a Magento 2 admin user cli and via admin panel. Hope you enjoy this tutorial!
Ref: Magento 2 User Guide and http://devdocs.magento.com/guides/v2.0/install-gde/install/cli/install-cli-subcommands-admin.html