I seem to have blew up the admin user account, password recovery is not working because the server cant send emails. how do I change the password for the admin console? from CLI since I cant get into the web :)
3 Answers
try this command
php bin/magento admin:user:create --admin-user="test" --admin-password="L3tsPlay$!" --admin-email="info@fodakty.com" --admin-firstname="Testing" --admin-lastname="Admin"
this will create an admin test user, go in to the admin console with it then you can then reset the password for admin or have a backup admin user called test in case you do this in the future again. good luck, we've all done it in the past :)
You can add an admin user using the CLI with the following command:
php bin/magento admin:user:create --admin-user 'adminUserName' --admin-password 'password' --admin-email 'adminemail@email.com' --admin-firstname 'admin-fn' --admin-lastname 'admin-lastname'
It doesn't seem like there's a bin/magento
command for resetting an admin password.
Your best chance is to create a new Admin user from the CLI and then use that user to reset the first user's password.
Something like the following should do the trick:
php bin/magento admin:user:create --admin-user="admin" --admin-password="password1" --admin-email="admin@example.com" --admin-firstname="Admin" --admin-lastname="Admin"