Current musing:

Using contenteditable to test css page layouts

This should be obvious, but I just realized that one could use the the HTML5 contenteditable feature to test page layouts. “Contenteditable” is a fancy little tag attribute that allows the user to edit the content contained in the element from the browser.

For example, Read more…

downloads

These guides are free, but if you have found them useful then please consider donating $2. Hey, that's less then the cup of coffee your drinking right?

subscriptions

« Blog home
How to get into MODx when your blocked or lost your password.

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.

  1. Go to your database and find the table titled “modx_user_attributes”
  2. Find the admin user and edit the following two items:
  1. Set “blockeduntil” to zero (0).
  2. Set failedlogincount to zero (0).
  3. Refresh the login page and type your password properly this time.

How to get in if you have forgot your password:

  1. If you are blocked then follow all the steps above and…
  2. 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.
  3. Go to your MODx database.
  4. Find the table titled “modx_manager_users”.
  5. Find the “password” field and replace its contents with the copied hash code you just created.
  6. Save the changes and return to the login screen and login with your new password.
10 Responses
  1. Sudrien says:

    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.

  2. Sudrien,

    Thanks for the tip! I’ve updated the post.

  3. Melriks says:

    Thank you for this tip. I book marked it for the next time I mistype the password.

  4. root says:

    or:
    mysql> use modxdb;
    mysql> update modx_manager_users set password=MD5(‘password’) where username=’admin’;

  5. Mark Esler says:

    thanks very much,

    i just replaced “modx_user_attributes” with another site i had out there

  6. [...] # 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. [...]

  7. techboy says:

    > 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.

  8. 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!

  9. itmontreal says:

    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

  10. Eystein says:

    Thank you. 4 years down and still relevant. Guess that’s why this post is on top on Google.

Have your say, leave a comment: