We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 40661
    • 5 Posts
    Hello,
    a client messed up with his super-admin user. I did a hard-reset of the password via API using the code found here:
    http://rtfm.modx.com/display/revolution20/Resetting+a+User+Password+Manually
    The password is reset, also all the queries are run correctly, but when I login into the Manager I get "permission denied" by ModX (not the webserver). There must be some part of ACL that I'm missing.
    How can I fix that? Thank you!

    I'm on modX 2.1
      • 3749
      • 24,544 Posts
      Be sure to delete all files in the core/cache directory and clear your browser cache and cookies.

      I'm not sure this will help, but here are the default ACL entries: http://bobsguides.com/default-acl-entries.html


      ------------------------------------------------------------------------------------------
      PLEASE, PLEASE specify the version of MODX you are using.
      MODX info for everyone: http://bobsguides.com/modx.html
        Did I help you? Buy me a beer
        Get my Book: MODX:The Official Guide
        MODX info for everyone: http://bobsguides.com/modx.html
        My MODX Extras
        Bob's Guides is now hosted at A2 MODX Hosting
        • 40661
        • 5 Posts
        Bob, I've deleted everything in cache - unfortunatley I cannot set the ACL from the panel, as I cannot access the panel. I was trying to understand how it works from mysql tables, but I have to say it's really unclear...
          • 40661
          • 5 Posts
          No one has information on the tables logic of the ACL system in ModX 2.1 ??
            • 3749
            • 24,544 Posts
            It's difficult to advise you because we don't know what the client actually did. Can you edit your user profile in Manage Users? If so, make yourself a sudo user. That may let you access the panel.

              Did I help you? Buy me a beer
              Get my Book: MODX:The Official Guide
              MODX info for everyone: http://bobsguides.com/modx.html
              My MODX Extras
              Bob's Guides is now hosted at A2 MODX Hosting
              • 28042 ☆ A M B ☆
              • 24,524 Posts
              Does 2.1 have the sudo user?
                Studying MODX in the desert - http://sottwell.com
                Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                Join the Slack Community - http://modx.org
                • 40661
                • 5 Posts
                I cannot access Manage Users - I tried a direct ModX API call to recreate the user but it did not work (i.e., user is still unauthorized to enter the Panel).
                No 2.1 does not have sudo user (added in 2.2.1)...
                I just need to be pointed out to some manual that explains how is the authorization for a user determined...so I can tweak the tables to fix it...
                  • 3749
                  • 24,544 Posts
                  It's complicated, because it depends on the admin user being a member of the Administrator User Group, the Policy attached to the Context Access ACL entry giving that group access to the mgr context, the role of the admin user in that group, and the specific permissions granted in the Policy. Most of the relevant values would be numbers or complex JSON strings rather than names and they're scattered among a half-dozen different tables.

                  TBH, I think the simplest method would be to upgrade to 2.2.1, then go into the modx_users table and put a one in the sudo field for yourself. Then delete all the files in the core/cache directory and clear your browser cache and cookies before logging in.

                  That should let you fix things based on the default values in the link I gave above.



                  ------------------------------------------------------------------------------------------
                  PLEASE, PLEASE specify the version of MODX you are using.
                  MODX info for everyone: http://bobsguides.com/modx.html
                    Did I help you? Buy me a beer
                    Get my Book: MODX:The Official Guide
                    MODX info for everyone: http://bobsguides.com/modx.html
                    My MODX Extras
                    Bob's Guides is now hosted at A2 MODX Hosting
                    • 40661
                    • 5 Posts
                    Bob, that worked! So I've first updated to the latest 2.2 version. Log in was still no-go (the system didnt' give a "unauthorized" error, but still it wouldn't let the user access the manager).
                    Changing the flag 'sudo' to 1 fixed everything. I will try to create a new admin and see if it will work...otherwise I will just leave it as it is now...
                    thank you all for the suggestions and support!