How to create admin user via Command Line in Magento 2?

If you want to create new admin user via CLI, You can create a new admin user through CLI by typing below command. The admin:user:create command is used to create new admin user via command line interface.

This post will help when you are facing login with admin panel and want to create a new user for admin.

To Run command,

First, navigate to your project root directory in the terminal. You will need to run the following command to create an admin user,

Response for the successful new admin user,
Created Magento administrator user named new-admin with green text.

You can replace new-admin and admin123 with your username and password.