Let's take the next actions to change your Magento 2 admin password.
You remember your current Admin passwordStep 1: Navigate to System > Permissions > All Users in your Magento backend
Step 2: This page displays a list of all users (including administrators) who are currently logged into your Magento backend. Click on the appropriate user to change that person's password.
Step 3: You'll see options to modify your current password in the panel that follows, as shown below:
You don’t remember your current passwordIf you don’t recall your Magento 2 Admin password, don’t worry. By using the following 3 methods, you can still acquire a new password in a matter of seconds.
1. Make use of the "Reset password" feature.Step 1: Go to Admin Panel >> Click Forgot Your Passwords
Step 2: Type your email address into the box provided and select Retrieve password.
Step 3: Open the password reset link in your inbox. After providing a new password, click Reset.
2. Use Magento CLI to create a new userYou can create a new admin user with the following command, and then use the new admin account to change the password of your original user since Magento CLI does not support changing admin passwords with a command. Run the following command:
php bin/magento admin:user:create --admin-user='admin' --admin-password='Admin123'
--firstname.lastname@example.org' --admin-firstname='firstname' --admin-lastname='lastname'
3. Change password from MySQL Manager or phpMyAdminStep1: Go to MySQL Manager or phpMyAdmin, go to the Magento 2 website database, and find the admin_user table.
Step2: Paste the following query:
UPDATE admin_user SET password = SHA2('$PASSWORD', 256) WHERE username='$USERNAME';Replace $PASSWORD with your new admin password, $USERNAME with the username you want to change the password for.
Hope this information is useful to you!
Thanks for reading!