RSS

Programmatically Change Admin Password in Magento

10 Jul
 

Mage::getModel('admin/user')
     ->loadByUsername('admin')
     ->setPassword($password)
     ->save();
 

If you want to do it via a Query here is the query to run:

UPDATE admin_user SET password=CONCAT(MD5('qXpassword'), ':qX') WHERE username='admin';

the resulting password would be ‘password’, qX is the salt you could use any 2 letter combo..

UPDATE admin_user SET password=CONCAT(MD5('bL123456'), ':bL') WHERE username='admin';

would make the password 123456 …

 
Advertisements
 
Leave a comment

Posted by on July 10, 2013 in Magento

 

Tags:

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: