Cannot log onto site, passwords were lost

Summary

Using a locally installed version of Modx and no one has passwords to log in. I have access to the database and user tables, but not able to figure this out

Environment

Using PHP_MyAdmin on Dreamhost.

I’ve tried using the “forgot password” feature on the login page, but I don’t believe it is sending any emails as I haven’t received any and I’ve checked my spam/junk folders. I do have access to the database, and I’ve been tinkering with resetting my own password there and using MD5 to hash a plaintext password and trying to use that to login but to no avail.

Any suggestions on where I’m going wrong? I haven’t had real time to focus on this because other things keep popping up. Thank you in advance

Did you follow the instructions on this page?

https://docs.modx.com/current/en/building-sites/client-proofing/security/troubleshooting-security/resetting-a-user-password-manually

1 Like

If all else fails:

This is kind of a brute-force method, but it can be used if you get stuck and you have PhpMyAdmin access through cPanel or the equivalent. Create a brand new install of the same version of MODX somewhere else — it doesn’t matter where. After making sure you can log in to the new site, open the modx_user tables of both sites. Cut and paste all fields for the admin user from the new site to the problem site. Be sure not to do it backwards. Once you’ve done that, you should be able to log in to the problem site with the credentials you used to log in to the new site.

1 Like

Is it actually telling you that your user/pass is wrong? Or is it just failing to log in and returning you to the login screen? If the latter, clearing cookies usually fixes this. Happens from time to time and I’ve never been sure why.

$0.02

1 Like

This was the solution. I was in a rush and was constantly being interrupted so I skipped over the VERY important text for the Modx Versions 2.1+

The sticky widget was that I did not change the hashing class! I should have paid more attention to the instructions instead of just looking at code. Thank you all, I was able to focus this morning and regain access. Ya’ll are the best

Be sure you don’t leave the hash method at MD5. It’s no longer safe.

This topic was automatically closed 2 days after discussion ended and a solution was marked. New replies are no longer allowed. You can open a new topic by clicking the link icon below the original post or solution and selecting “+ New Topic”.