Locked Out from Magento admin?
9 Comments 12th DEC 2009 | Posted by Ivan Weiler in Magento

Here’s the situation, you, client, webmaster, pet or whoever was playing with users and roles in your favorite store and deleted only main admin account or broke admin account privileges. If it happened to you and you’re locked out from your Magento store, read on.
This script creates new admin user associated to new Inchoo role with all privileges set. Of course, you have to have FTP access for this to work.
Download newadmin script, unpack it, open newadmin.php file (notepad will do) and define username, email and password of the new user. Username and email must be UNIQUE in Magento, so use some new ones and not the old ones that are already in the system, you’ll change it later after you login.
Connect with FTP and copy newadmin.php file to root of your store and run it through web browser like
http://www.yourstore.com/newadmin.php
The script will try to delete itself after user is created, but please make sure it’s removed from the server. Code is tested on 1.3.x versions of Magento and I don’t believe it will work on older versions, so please write some feedback.
Regards


















December 12th, 2009 at 16:36
OK, theoretically, is that right that if someone has write access to one of magento’s directories on the server with the help of this script he can get an access to magento admin and all the confidential data?
December 12th, 2009 at 19:33
WOW thanks dude fix it!
December 13th, 2009 at 1:50
Yep, if you have read/write access to filesystem, you can do anything you want with the database.
That applies to any application.
December 14th, 2009 at 9:00
Just to make a simple note…
if you guys just need to change the password, that for some reason you don’t remember and email system is not working properly in order to retrieve the new password, just point your browser into this nice article:
http://www.magentocommerce.com/wiki/general/resetting-admin-password
December 22nd, 2009 at 20:12
Amazing. Worked like a charm, thanks!
December 31st, 2009 at 17:21
When I downloaded the ZIP file, WINZIP says it is not a valid zip file. Could it have gotten corrupted? Is it WINZIP compatible?
December 31st, 2009 at 17:59
Hey David,
Go to celebrate new year. It is no time to write about Magento.
January 29th, 2010 at 15:24
WOW thanks!!!!!!
February 17th, 2010 at 18:45
Is there an extension that can check a magento install and make sure all the files and folder have proper read-write permissions? I had to play around with permissions a lot when installing extensions, I feel like I might have opened the pandora box.