Magento reset admin password: Different methods to implement it promptly

Magento resetting the admin password is not always an easy task. However, you can use some methods to restore your admin password. These solutions are especially useful when your account is locked and need to reset the password.  Let’s follow some steps to reset the admin password in Magento 2 store.

Magento reset admin password

reset admin password

As a Magento 2 store admin, you know that complicated and varied passwords are one of the best ways to improve your account security. Especially, for an eCommerce website, the security experts suggest that using strong unique passwords is a must-have task. However, such passwords are hard to keep in memory, you may forget them and lose the ability to manage your eCommerce store as an admin. Luckily, there are some different ways to restore your admin password. Let do the following steps to reset your admin password in Magento 2.

Method 1: Web interface

This is the most common and easy solution which everyone should try as the first option.

  • Firstly, you move to the Magento admin backend in a browser and click the link Forgot your password?
Magento reset admin password
  • In the Email address field, you fill your email address, then click Retrieve Password.
Magento reset admin password
  • If the email address is correct, you will get an email with a link to confirm the password reset. Click this link to launch the password reset page.
  • In the New Password and Confirm New Password, you enter the same password, then click Reset Password.
Magento reset admin password
  • Lastly, you enter your new credentials to log in to the Magento 2 admin panel.

Method 2: Reset Admin Password using Account Settings

You can even reset Magento 2 Admin Password from the Account Settings in the backend.

  • Log in to Magento Admin Panel.
  • Go to Account Setting as shown in the figure.
Magento reset admin password
  • Next, Enter the New Password.
  • Enter the new password again in the Password Confirmation field.
  • Enter your old password in the Your Password field.
  • Then, click on Save Account.
Magento reset admin password

Method 3: Reset admin password by command line

  • Firstly, you need to connect your server with SSH, then move to Magento Root Folder and use the below command for creating a new user,
bin/magento admin:user:create
  • You will have to enter some information like username, password, email, first name, and last name. For example:
Admin user: magesolution
Admin password: Your Password
Admin email: test.magesolution@gmail.com
Admin first name: Magesolution
Admin last name: Team
  • That’s it, and your new admin user with the username Magesolution is created. You can also use the below command with all the information passing in one command string.
php bin/magento admin:user:create –admin-user=”gaurav” –admin-password=”gaurav123″ –admin-email=”admin@google.com” –admin-firstname=”Admin” –admin-lastname

Useful tip: In rare cases, if the admin user is locked out, then you can apply the following command to unlock it

php bin/magento admin:user:unlock admin-username

Method 4: Reset admin password via phpMyAdmin

Alternatively, you could also insert a SQL query to make adjustments to a specific user in your admin_user table in your database. To do this, you need to log in to PHPMyAdmin and select the database which contains the data for your Magento store.

  • You go to phpMyAdmin
  • Navigate to the Database section and search for the admin_user table
Magento reset admin password
  • After that, you can use the below query as shown in the figure.

Sum it up

These are the steps that will be useful to reset your admin password in many different ways. In case you have any issues during the implementation of the above steps, then feel free to contact us and get guided by the best of our Magento enthusiasts. Besides, if you want to leverage your store, our Magento Website Development service will be definitely for you. Don’t hesitate to connect us and help you operate the Magento store smoothly.

What is Magento PCI compliance and why does your Magento store need it?