Reset admin user password

Published by Christian Münch on

This is only a quick tip.
But in some cases you need to reset a admin user password i.e. if you imported a dump
as developer and have no admin credentials.

There are two commands for that.

Create a new admin user

$ n98-magerun.phar admin:user:create

Creates a new admin user in interactive mode.

Change password of an existing admin user

You can list all admin users with admin:user:list command and should see a list like this:

$ n98-magerun.phar admin:user:list

+----+----------+----------------------+--------+
| id | username | email                | status |
+----+----------+----------------------+--------+
| 1  | admin    | [email protected] | active |
+----+----------+----------------------+--------+

Now you can change the password with this command:

$ n98-magerun.phar admin:user:change-password [email protected] "mynewpassword"

Hope this helps you a little bit.


3 Comments

Danyal Abraham · August 19, 2013 at 06:22

Nice Post, I have been using a shell file to reset password.

Regards
Danyal
http://www.thetechsuport.com/goto/magento-optimized-hosting-on-nexcess-hosting-as-low-as-24-99/439

    Christian Münch · August 19, 2013 at 23:47

    Yes. One of the main goals was to reduce the number of single shell scripts.

Francis Kim · August 8, 2016 at 06:27

Maybe a recent change but I’ve had to use the username and not the email address to reset.

Leave a Reply

Avatar placeholder

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.