We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 35843
    • 34 Posts
    Hey

    Allright so I tried the following but am still unable to reset the password.

    UPDATE modx_user_attributes SET blocked=0 WHERE id=1;
    UPDATE modx_user_attributes SET blockeduntil=0 WHERE id=1;
    UPDATE modx_user_attributes SET failedlogincount=0 WHERE id=1;

    UPDATE modx_manager_users SET password=MD5('b3980e56a067cb1ed5a15dd79082f38e') where id=1;

    I keep getting a blocked error.
    You are blocked and cannot login. Please Try again later.

    All the values that are pertinent are set to 0. I saw on a previous posting where somebody edited their config.cache.php file but I'm not sure where to find this.

    Need help ASAP.

    Thanks
    Riz
      • 35843
      • 34 Posts
      So I hunted everywhere for the solution which I finally reached after a few hours. BTW google is great but not that great. Here's what I found dug deep inside the modx wiki.



      http://wiki.modxcms.com/index.php/Manager_Lockout#Blocked


      How to Add a Manager User using MySQL only

      This requires that you have MySQL access to the database. I've had to "break in" to several MODx sites when clients have forgotten their passwords, or when an angry admin has abandoned the site...

      The procedure requires that you insert a row into two different tables. Note that the table names listed here do not have prefixes; your install may use slightly different table names, e.g. "modx_manager_users".

      First, you need to create a manager user by inserting a row into the manager_users table:

      INSERT INTO manager_users (username,password) VALUES ('yourname','e19d5cd5af0378da05f63f891c7467af');

      Here's I'm using the hash value of "abcd1234" as a default password. I'll change this later.

      After doing this, you need to get the id of your newly created user.

      mysql> select * from manager_users WHERE username='yourname';
      +----+----------+----------------------------------+
      | id | username | password |
      +----+----------+----------------------------------+
      | 4 | yourname | e19d5cd5af0378da05f63f891c7467af |
      +----+----------+----------------------------------+

      Remember the id from the result. (Here the id is 4).

      Next insert a row into the user_attributes table:

      mysql> INSERT INTO user_attributes (InternalKey,role) VALUES ('4','1');

      Once I created this secondary user, I was able to login. When I entered, somebody or something had set the blocked until after to a date in 1969. I removed that and all was good.

      Thank god for this. I was pulling my hair out. I knew I had to reset something in one table, but didn't know about the other.

      Hope this helps someone!!!!