Sometimes When we install the Magento, and try to login in admin panel with correct credentials, but it won’t be accepted and login is denied. The reason is that details were not properly saved in Database. So we can’t login in back-end.

In Magento2 we didn’t know how to create admin user directly in database.

So Here is the solution to create the admin user using SSH. After that, you can login to admin side using these credentials.

Parameters & explanation:

Name

Value

–admin-user:- Magento administrator user name
–admin-password:- Magento administrator user password
–admin-email:- Magento administrator user’s e-mail address
–admin-firstname:- Magento administrator user’s first name
–admin-lastname:- Magento administrator user’s last name

Also you can see the help using this command:

Hope, This will be useful.