-
- 4 Posts
Hi,
I am new to MODX. I host a site for a client and he asked for help. This was the original problem:
"I am trying to add a section to the Rising Ridge Website for a blog. In MODX I am unable to add a new resource and when I try I get the following message "You do not have permission to create a Resource in this location." This has been a problem in the past where our ability to edit the website seems to disappear due to permission settings. Is there something you can do on your end to allow me to add new resources to the website?"
I did some research on permissions. It seemed like I did not have an admin login, and he did not have the password. I tried the instructions to change the password and this lead to another problem. The instructions said to modify the modx_user_attributes table in myphpadmin, however, it does not seem to exist. modx_users is the only field I see that has the users - I tried it there and it did not seem to help. Not sure what to do! Please help!
Thanks
There is a System Setting to allow users to create resources in the root of the Tree; this is to keep users from adding too many root-level resources and breaking the main menu.
Which version of MODx are you using?
There must be a modx_user_attributes table. The modx_users table only holds username and password and other very basic information about the user, all the profile information is in the modx_user_attributes table.
However, to change the password, you would need to change the hash_class to hashing.modMD5 then change the password, selecting MD5 from the "function" dropdown in phpMyAdmin. Or in the SQL field, use
UPDATE modx_users SET hash_class = 'hashing.modMD5', password = MD5('the-new-password') WHERE username = 'theusername';
http://rtfm.modx.com/revolution/2.x/administering-your-site/security/troubleshooting-security/resetting-a-user-password-manually
-
- 4 Posts
That is what I did (through phpMyAdmin) and the new password did not work. I am 99% sure I did it right as it is the same basic process in Wordpress which I have done several times. I can give you cPanel access if you want to check it out.
Thanks very much for the help!
-
- 24,544 Posts
If everything else fails, you can create a fresh install of MODX somewhere with a known username and password for the admin. Make sure the admin can log in. Then cut-and-paste *all* the fields of the first record in the modx_users table from that install into the first record of the problem site's modx_users table. You should be able to log in then to the problem site with those same credentials.
Be sure to delete all files in the core/cache directory of the problem site and clear your browser cache and cookies before trying to log in.
This assumes that no one deleted the main admin user. That was possible in some earlier versions of MODX, but if the user ID in that first record is 1, you should be OK.
Also, in the problem site, make sure that first user is marked as active and not blocked.
One last thing: Check the name of the database in the core/config/config.inc.php file and make sure you're modifying the correct database.
If all that fails, try making the user a sudo user by putting a 1 in the 'sudo' field of that first record. Again, delete the files in the core/cache directory before trying to log in.
If you had to go the sudo route, it probably means that there's something wrong with the Context Access ACL entries for the Administrator group. In earlier versions of MODX, it was possible to alter or delete them.
[ed. note: BobRay last edited this post 10 years, 4 months ago.]
-
- 4 Posts
The admin user is there, and from the little I know it looks like it is OK and not locked out. I can't figure why the password change will not work...
Is there an easy way to make another user an admin with full rights?
Thanks again!
-
- 24,544 Posts
Sure. Just create a new user, then add that user to the Administrator group with a role of admin Super User.