Magento is a multifunctional ECommerce platform you may need some help managing. That's why you create new admin users in Magento 2 responsible for different things on your website. You also grant them access only to certain sections of your store for security reasons.
So, in this article, you will learn how to create admin user in Magento 2 via two methods and find out about necessary admin panel security measures for admins.
How to Create Admin User in Magento 2 via Admin Panel?
In order to create admin user in Magento 2 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 interfaces for the user.
We recommend selecting English since Magento has some issues on other locales.
If you decide to choose some other language make sure you install a language pack of your preference in your Magento 2 store.
- 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 user roles in Magento 2 to know why you need them.
Once you finish don't forget to save the new Magento admin user.
How to Create Admin User in Magento 2 via Command Line (CLI)?
The other way to create admin user in Magento 2 is via 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"
Secure Magento 2 Admin Panel
Your store is managed by a lot of admin users. All of them have access to different sections of your store. So, you have to make sure nothing violates your store's security by taking necessary security measures.
That is why you should disable admin account sharing and enable forced password change for your admins to improve Magento security.