How to Create Admin User From Command Line in Magento 2
Managing user accounts is an important aspect of running an e-commerce store, and Magento 2 offers an easy way to create admin users from the command line. In this article, we will guide you through the step-by-step process of creating an admin user in Magento 2 using the command line interface. This tutorial is aimed at developers and system administrators who need to manage user accounts efficiently and at scale. By following the instructions in this article, you'll be able to quickly create a new admin user in Magento 2 and start managing your e-commerce store with ease.
Step 1: Connect to your Magento 2 server using SSH.
Step 2: Navigate to the root directory of your Magento 2 installation.
Step 3: Enter the following command to create a new admin user:
bin/magento admin:user:create --admin-firstname="Admin" --admin-lastname="User" --admin-email="[email protected]" --admin-user="admin" --admin-password="password123"
Replace the values for "Admin", "User", "[email protected]", "admin", and "password123" with your desired values.
Step 4: Press Enter to run the command. Magento 2 will create a new admin user with the username "admin" and the password "password123".
Step 5: Log in to your Magento 2 admin panel using the new admin username and password.
Congratulations! You have successfully created a new admin user in Magento 2 from the command line.
In conclusion, creating an admin user from the command line in Magento 2 is a quick and easy process. By following the steps outlined in this article, you can create new admin users in no time. This feature is especially useful for developers and system administrators who need to manage user accounts on a large scale.