This has never *cough* happened to me. But what if you forget your password and block yourself out of your MODx Admin account?
Before we begin, you need to have access to your MODx’s database for any of the below information to be helpful. Hopefully you have a different password (that you do remember) for your database! Many web hosts provide MyPHPAdmin for you to use, and often it is bundled with your server’s control panel. If you can get to it you’re good to go.
How to get past the blocked status:
If you miss type your password more than 4 times you get blocked and have to wait several minutes before the system will let you try again. This can be really annoying if you just have clumsy fingers.
- Go to your database and find the table titled “modx_user_attributes”
- Find the admin user and edit the following two items:
- Set “blockeduntil” to zero (0).
- Set failedlogincount to zero (0).
- Refresh the login page and type your password properly this time.
How to get in if you have forgot your password:
- If you are blocked then follow all the steps above and…
- Visit http://md5.benramsey.com/ and type in a new password in the big box labeled “String to convert to an MD5 hash:” Click the “Create…” button at the bottom. Select and copy the resulting string of letters and numbers on the right.
UPDATE: You can do this in phpMyAdmin directly (or with a mySQL query) See the first comment below. - Go to your MODx database.
- Find the table titled “modx_manager_users”.
- Find the “password” field and replace its contents with the copied hash code you just created.
- Save the changes and return to the login screen and login with your new password.
You can do this with SQL alone…
SELECT md5("password")Or, In phpMyAdmin, (Step 5) Enter your password normally, and select MD5 from the list beside.
-Sud.
Sudrien,
Thanks for the tip! I’ve updated the post.
Thank you for this tip. I book marked it for the next time I mistype the password.
or:
mysql> use modxdb;
mysql> update modx_manager_users set password=MD5(‘password’) where username=’admin’;
thanks very much,
i just replaced “modx_user_attributes” with another site i had out there
[...] # Refresh the login page and type your password properly this time. Web by Booth ? How to get into MODx when your blocked or lost your password. [...]
> root says:
>January 8, 2008 at 6:54 pm
>or:
>mysql> use modxdb;
>mysql> update modx_manager_users set password=MD5(‘password’) where username=’admin’;
Best answer, thank you root.
thanks Lucid. I used this method to get into a personal site that I hadn’t used for a long time. Got me in no probs!
Thank you it helped me solve the issue.
I also found the original thread on the wiki of modx cms.
http://wiki.modxcms.com/index.php/Manager_Lockout
Thank you. 4 years down and still relevant. Guess that’s why this post is on top on Google.