Creating a Magento 2 admin user via the command line.

This is a pretty simple task, but I always have to look up the documentation on what the switches are to make a user, so below is the command I use:

php bin/magento admin:user:create --admin-user="kmiles" --admin-password="password1" --admin-email="email@domain.com" --admin-firstname="Kevin" --admin-lastname="Miles"

There’s also a sometimes needed unlock command for when a user, or myself, tries to log in with the wrong password too many times.

php bin/magento admin:user:unlock kmiles

 

Leave a Reply

Your email address will not be published. Required fields are marked *