Reset your Password - Unblock your User
Last edited by Emmanuel Piguet on Jun 10, 2014.
We all have it happen at one point in time or another... We forgot our manager username/password, and then trying the different options we get blocked!
Database Editor to the Rescue
The secret to regaining access, your database editor, usually PHPMyAdmin granted other editors will work just fine.
The first step is to open your database editor and browse to your MODX database.
Forgotten Password
- Open the modx_manager_users table (You may not have the modx_ prefix, if this is the case just look for the manager_users table)
- Edit the record for your username
- Change the password filed to: e10adc3949ba59abbe56e057f20f883e (Your password will be: 123456)
- Save the change
- If you aren't blocked attempt to login with the new password
- Change the password after you login!
Advanced Tip
You can set any password by changing the drop down field type to MD5. Just enter the desired password instead of the above hash.
Block Too
- Open the modx_user_attributes table(You may not have the modx_ prefix, if this is the case just look for the user_attributes table)
- Edit the record for your user (The admin user is typically id 1)
- Change the blocked column value from 1 to 0
- Save the change
- Attempt to login using your username and password (or newly set password from above)
Limited Access
In some cases you may not have access to a database editor readily available, in those cases it is still possible to restore manager access. You will need to upload your own database editor, such as phmyedit. You only need basic functionality, so a smaller editor will save you some time. Once uploaded you can copy the database information from the MODX config file (manager/includes/config.inc.php).
This can be helpful should the client be abandon by their prior developer, their hosting company not provide access to a database editor, or you are in a pinch and only have FTP access.
Add a user via MySQL
It is possible to add a new manager user without going through the Manager, if possible you should always use the manager.
You will need to add two records to different tables, your database may not have the modx_ prefix, if this is the case look for the same table name without the modx_
- Open the modx_manager_users table
- Create a new record with the desired username and password (see forgot password for a hash to use)
- If you are able to run SQL commands you may optionally run:
INSERT INTO manager_users (username,password) VALUES ('yourname','e10adc3949ba59abbe56e057f20f883e');
- After adding the manager user make note of the ID number for your user, you will need it in a moment.
- Open the modx_user_attributes table
- Create a new record with an InternalKey of your user ID (the number you just forgot from before), and a role of 1
- If you are able to run SQL commands you may optionally run (substitute the 4 with your user id):
INSERT INTO user_attributes (InternalKey,role) VALUES ('4','1');
Once you have created both records you should be able to login to the manager using the username and password set in step 2. Once logged in make sure to change your password!
Suggest an edit to this page on GitHub (Requires GitHub account. Opens a new window/tab).