How to Create Admin User via Command Line in Magento 2-
Hello magento friends todays in this blog post im share with you to How to Create Admin User via Command Line in Magento 2. To create an admin user via the command line in Magento 2, you can use the bin/magento command-line tool provided by Magento. Here's how you can do it:
➤ Access the Command Line:
Open a terminal or command prompt and navigate to your Magento 2 installation directory.
➤ Run the Command:
Use the following given bellow command to create an admin user :
bin/magento admin:user:create --admin-user=<username> --admin-password=<password> --admin-email=<email> --admin-firstname=<firstname> --admin-lastname=<lastname>
Replace <username>, <password>, <email>, <firstname>, and <lastname> with the desired values for the admin user.
For example:
Complete the Setup: After running the command, you should see output indicating that the user was successfully created. You can now use the provided credentials to log in to the Magento admin panel.
Remember to replace the example values with your actual desired values for the admin user. Additionally, make sure you are in the Magento installation directory and using the correct bin/magento command for your environment.
Please note that this information is accurate as of my last knowledge update in September 2021, and there might have been changes or updates in Magento 2 since then. Always refer to the official Magento 2 documentation or resources for the most up-to-date information.
.png)