How To Reset Admin Password In Magento 2
Forgot your Magento 2 admin password? Want to get it back but don’t know how? In this post, I will guide you on How To Reset Admin Password In Magento 2.
Magento admin username and password are very important for admin. It is the authentication method that gives you access to the admin panel. Security experts recommend using a strong password. So maybe it became hard for you to remember and you forgot about it.
1. Reset Admin Password Via phpMyAdmin
1. Access to phpMyAdmin and go to your Magento 2 database.
2. Search for the admin_user table and check the username of the admin account.
3. Execute the below query below:
UPDATE admin_user SET `password` = SHA2('<new-password>', 256) WHERE `username`='<your-admin-username>';
4. Click Go button to execute the query.
2. Reset Admin Password From Admin Panel
1. Go to Magento 2 Admin Panel.
2. Click Forgot your password?.
3. Enter your email address, complete the CAPTCHA and then choose the Retrieve Password button.
4. An email will be sent to your email address, containing a password reset link. And easily set a new password with the reset password link received in the Email
3. Reset Admin Password Via Command Line
1. First, you need to connect to your server via SSH as the root user by command:
ssh root@<your-ip-address> -p <your-port-number>
2. Go to Magento 2 root folder.
3. Run the below command:
php bin/magento admin:user:create --admin-user=<your-admin-username> --admin-password=<your-admin-password>
Next, enter email, first name, and last name.
This command is actually to create a new user, but it can also be used to reset the password if the user already exists. |
4. Reset Admin Password From Account Settings
1. Log in to Admin Panel.
2. Go to Account Settings by click username on the top right.
3. Enter the new password, password confirmation, and old password to make a change.
4. Click Save Account when complete.
This is the end of the How To Reset Admin Password In Magento 2.
Follow us for the more helpful posts!
We hope this is a useful post for you How To Customize Email Templates In Magento 2.
Thank you for reading!