Magento is a multifunctional ECommerce platform you may need some help managing. That's why you create new admin users responsible for different things on your website and grant them access only to certain sections of your store for security reasons.
How to Create a New Magento 2 Admin User via Admin Panel?
In order to create a new admin user via Admin Panel take the following steps:
1. Go to Admin Panel > System > Permissions > All Users.
2. Press the Add New User button.
3. Fill out the Account Information.
- In User Name set the name of the user which will be used during login.
- In the following fields, you have to set user First and Last Names, Email, Password, and Passpword Confirmation.
- In Interface Locale you choose the language of the admin panel interface for the user. We recommend selecting English as far as Magento has some issues on other locales. If you decide to choose some other language make sure the language pack of a selected language is installed on your Magento 2 shop.
- Make user active in This account is a select box.
4. Enter the current password of a user you are logged in under in the Your Password field.
5. Go to User Role section and choose the role you want this user to be linked to. Learn more about how to create user role in Magento 2.
Once you have finished don't forget to press the Save User button.
How to Create a New Magento 2 Admin User via Command Line (CLI)?
Please open a command line and navigate to your Magento 2 root directory, then execute the following command:
php bin/magento admin:user:create --admin-user="USER_USERNAME" --admin-password="USER_PASSWORD" --admin-email="USER_EMAIL" --admin-firstname="USER_FIRSTNAME" --admin-lastname="USER_LASTNAME"
php bin/magento admin:user:create --admin-user="jondoe" --admin-password="asdAdnkjois97dtasdas" --admin-email="firstname.lastname@example.org" --admin-firstname="Jon" --admin-lastname="Doe"