One of the issues that owners/administrators for Modx will face is the reset of the password for users who have forgotten it or are unable to recover it using the typical forgot password interface. Fortunately, Modx does provide two different ways to recover passwords manually: through the database and using an application programming interface code. The following article describes how to manually recover the password for Modx Revolution using the database.
Note: Manually changing the passwords for Modx Revolution requires access Cpanel and phpMyAdmin. For more information on using phpMyAdmin, please see Managing Databases Through phpMyAdmin
Before you begin, you will nee to obtain the update query for changing the hash that is used to encrypt the password. By default the hashing class is set to use PBKDF2, but this type of hash is not available in phpMyAdmin. Fortunately, Modx lets you change the hash class to MD5, which CAN be used in phpMyadmin. Modx provides the mySQL update query here:
UPDATE modx_users SET hash_class =
'hashing.modMD5'
, password = MD5(
'the-new-password'
) WHERE username =
'theusername'
;
The code above also includes the update query for the password that you need to change. You will need to know the user name in order for the query to work. Note that this query will only work with Modx 2.1 and greater (Web Hosting Hub only has the installation files for the newer versions of Modx).
Note that it is possible to change the hash BACK to PBKDF2, but you will need to load the pbkdf2Convert Plugin that you will have to obtain from Modx. Changing passwords for users is normally handled by the Forgot Password option available upon logging into Modx. When this option is not possible, the manual methods of getting the password can be used. However, they should only used as a last resort in order to maintain the security and stability of the database for the Modx application since this exposes the tables of the database to manipulation.
n/a Points
|
2014-04-05 6:39 am
Thank you very much for taking the time to post this, it was exactly what I needed and I was able to manually reset the password in the MySQL database! Was missing the hash_class before :) |
Email: | support@WebHostingHub.com | Ticket: | Submit a Support Ticket |
---|---|---|---|
Call: | 757-416-6627 | Chat: | Click To Chat Now |
We value your feedback!
There is a step or detail missing from the instructions.
The information is incorrect or out-of-date.
It does not resolve the question/problem I have.
new! - Enter your name and email address above and we will post your feedback in the comments on this page!