Cookies setting

Cookies help us enhance your experience on our site by storing information about your preferences and interactions. You can customize your cookie settings by choosing which cookies to allow. Please note that disabling certain cookies might impact the functionality and features of our services, such as personalized content and suggestions. Cookie Policy

Cookie Policy
Essential cookies

These cookies are strictly necessary for the site to work and may not be disabled.

Information
Always enabled
Advertising cookies

Advertising cookies deliver ads relevant to your interests, limit ad frequency, and measure ad effectiveness.

Information
Analytics cookies

Analytics cookies collect information and report website usage statistics without personally identifying individual visitors to Google.

Information
mageplaza.com

Create New Magento 2 Admin User [Step-by-step guide]

Vinh Jacker | 12-18-2024

Create New Magento 2 Admin User [Step-by-step guide]

From Magento 2 configuration, you can create admin user accounts as many as you need but they will be set in different access levels if you ask. For example, you can assign the view and change only for websites or stores without any global settings or data. Online merchants need to restrict the admin access to ensure the management tasks are not overlapped. Moreover, it also enhances a website’s security if the store owner wants to protect particular data.

To limit the access permissions for admin user accounts, you can complete the required credentials on the Magento Administrator, which will be described in detail in the tutorial I am writing here.

Steps to Create New Admin User in Magento 2

Step 1: Configure User Information

First, you have to add the user’s information such as name, email, password, and other details.

  • On the Admin panel, click System. In the Permissions section, select All Users.

Alt text

  • In the upper-right corner, click Add New User button

Alt text .

  • In the Account Information section, do the following:

How to Create New Admin Magento 2

  • In the User Name field, enter the user name for account. It is not case-sensitive.
  • Complete the following information:

    • First Name
    • Last Name
    • Email address: this email address must be unique.
  • In the Password and Password Confirmation field, enter the password correctly. The password should be secured, should contain more than seven characters and should include both letters and numbers.

  • In the Interface Locale field, select the language to be used for the Admin interface if your store has multiple languages.

  • In the This Account is field, set to Active

  • In the Current User Identity Verification section, enter your password in Your Password.

How to Create New Admin Magento 2

Step 2: Determine User Role

In this step, you are going to set the particular role for the Magento admin account that you have just created.

  • In the panel on the left, choose User Role. The grid lists all the existing roles. Initially, the only role available is Administrators.

How to Create New Admin Magento 2

  • In the Assigned column, select the Administrators option.
  • When complete, click Save User.

Step 3: Check Result

Flush cache and check your result.

Create Magento 2 Admin Account Via The Command Line

Another way to create an admin account / user, we can create a new admin user via command line (cli). Here is how to do it.

Go to Magento 2 root folder, run create a new admin user command line:

php bin/magento admin:user:create

It will ask you: username, password, email, first and last name.

Here is what we filled:

Admin user: mageplaza
Admin password: YourPassword
Admin email: [email protected]
Admin first name: Mageplaza
Admin last name: Team

In which you can use the following table to determine parameters and values:

Name Value Required?
--admin-firstname Administrator user’s first name. Yes
--admin-lastname Administrator user’s last name. Yes
--admin-email Administrator user’s e-mail address. Yes
--admin-user Administrator username. Yes
--admin-password 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. If the password string contains special characters that require literal interpretation (such as backslashes or spaces), enclose the password in single quotations.
Yes
--magento-init-params Add to any command to customize application initialization parameters

For example: MAGE_MODE=developer&MAGE_DIRS[base][path]=/var/www/example.com&MAGE_DIRS[cache][path]=/var/tmp/cache
No

And get result:

Created Magento administrator user named mageplaza

magento 2 create admin user

Flush cache and check your result.

Now that you know how to grant users certain access, try to track their activity regularly to avoid potential problems. You can check which orders these admins view, the customers they remove or create, and even the settings they make.

To do so, read our comprehensive blog about How to Configure Magento 2 Admin Action Log?.

The bottom line

Today we have looked at how to create a new Magento 2 admin user for your store, as well as configure the admin’s store access permissions. You can easily do this in the backend or via the command line as you wish, both in a blink of an eye. I hope this tutorial is helpful for you, so feel free to leave comments and questions for this topic down below.

Explore Admin Permissions extension!

Related Topics

x
    Jacker

    With over a decade of experience crafting innovative tech solutions for ecommerce businesses built on Magento, Jacker is the mastermind behind our secure and well-functioned extensions. With his expertise in building user-friendly interfaces and robust back-end systems, Mageplaza was able to deliver exceptional Magento solutions and services for over 122K+ customers around the world.



    Related Post

    Website Support
    & Maintenance Services

    Make sure your store is not only in good shape but also thriving with a professional team yet at an affordable price.

    Get Started
    mageplaza services