1. Home
  2. MageMojo Hosting
  3. Resetting a Magento admin password

Resetting a Magento admin password

Always use the forgotten password links where possible before moving on to the other options listed on this page.

Magento 1

Magento 2

Reset via database in Magento 1

Magento stores passwords in the admin_user table in salted MD5 format.  In the unusual case that you are unable to access your store and the forgotten password link is not working, you can update the password by editing this hash directly.

  1. Access your database via the command line or a tool like PhpMyAdmin.
  2. Navigate to the admin_user table, find the user you need to reset and you will see one column titled password. There you should see an entry like this:
  3. dda6914384e239b08bcb3b624fe25719:nOQ7jmB6Rn8cUdESL3Ds5h6RHzDog8h1

  4. The left side is the hash for your password while the right side of the colon is the salt. Since cracking this is not very likely for you, we want to use own md5. To do this, use a tool that will convert your password/string to md5 such as this site or similar tools. – http://md5.my-addr.com/md5_salted_hash-md5_salt_hash_generator_tool.php
  5. In your tool of choice generate the password hash either with the same salt from the admin_user table or generate a new one.
  6. Insert or copy the new hash with salt into the password field in the same format with the password hash on the left and the salt on the right of the colon.
  7. Test your new login and it should now let you into your admin.

Reset using n98-magerun

Any server running Mojo Host Manager can utilize n98-magerun, a very useful 3rd party tool. To reset your password run the command n98-magerun admin:user:change-password from the root of your Magento install. Then follow the prompts:

Reset using n98-magerun2

If you are using Magento 2, then the command is identical to n98-magerun for Magento 1, but the password requirements are more stringent and require numbers.

Updated on July 27, 2017

Was this article helpful?

Related Articles