Gone are the days of creating a new admin user directly in the database. If you hadn’t discovered n98-magerun, I’m sure you are very familiar with creating a new user or updating a password via SQL queries on a Magento 1 installation. Fortunately, Magento 2 has added the ability to create a new admin user via the command line. Here’s how…

Log in to the server via SSH and change to the Magento 2 root directory. Then just run the following command (change values to reflect your information):

php bin/magento admin:user:create --admin-user='USERNAME' --admin-password='PASSWORD123' --admin-email='myemail@no-email.com' --admin-firstname='FIRSTNAME' --admin-lastname='LASTNAME'

Parameters and Values:
–admin-user == Admin Username
–admin-password == Admin Password
–admin-email == Admin email address
–admin-firstname == Admin First Name
–admin-lastname == Admin Last Name