We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36760
    • 136 Posts
    I had a Modx installation on a server that was recently hacked. Backups were restored, but now I can't login with the admin account.

    I tried retrieving password reset information via email, using the form on the login screen, but it says an account with that email cannot be located, but I can see the account in the database.

    I also tried changing the password directly in the database using this method: http://rtfm.modx.com/display/revolution20/Resetting+a+User+Password+Manually, but when I run the command it says 0 rows were affected.

    I double checked all of the config files, and everything is pointing to the correct location.

    Is there a way to create an entirely new account right in the database? If that's not possible, I may try installing Modx fresh and just not restoring the user account related tables in the database. Which will hopefully leave me with an account I can get in with.

    I appreciate any help or ideas. [ed. note: firebot6 last edited this post 12 years ago.]
    • Which version of MODX are you using? Did you follow the steps for your version? I also wonder if there are missing files or incorrect permissions after the restore. This could affect the way in which MODX works.
        Author of zero books. Formerly of many strange things. Pairs well with meats. Conversations are magical experiences. He's dangerous around code but a markup magician. BlogTwitterLinkedInGitHub
        • 32316
        • 387 Posts
        whistlemaker Reply #3, 12 years ago
        You can create a new user in the database, the trick is setting the password - this page may help with that: http://rtfm.modx.com/display/revolution20/Resetting+a+User+Password+Manually
          • 36760
          • 136 Posts
          I appreciate the help!

          It turns out the database password was changed by the host as part of the restoration. Putting the correct password in the config files solved all my problems!

          I'm still not sure why it said no rows were affected when I tried to edit the password in the database using the steps referenced. I tried both methods just to be sure. It's possible I did something else wrong, but I hope I'm never in this situation again.