How to Reset Admin password in Magento 2

The easiest and probably the correct way to reset the Magento administrative password is to use the command line:

n98-magerun2 admin:user:change-password

As you noticed, you need to install the n98-magerun2 utility, since there is no password reset command in the standard Magento command set (php bin/magento).

In addition to the password, you may also need to reset two-factor authentication:

n98-magerun2 security:tfa:reset <username> google

If you have access to the Magento admin panel and need to reset the password for someone else, you can do it right from the panel.

Leave a Reply

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