We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 32247
    • 3 Posts
    Hi Everyone,

    I've a fresh install of Modx and basically set all file permissions so apache can do as it pleases with the folders, protected only by the stock .htaccess. I've installed the login add-on and configured a members area to my site. This all functions fine. Finally I've added in modActiveDirectory, set it to add all users to the group with Permissions to the private area.

    The problem is that even setting log level = 4, it seems that nothing is happening, no errors, no respose. My sysadmin has provided all the relevant details, so they should work correctly.

    I've not added any snippets to the templates (as I did with Login) so I feel like I'm missing something simple that should trigger the process, but cannot see what it should be. Can anyone please help?

    MODX version: Modx Revo 2.2.6pl
    Mysql: 5.0.96
    PHP: 5.3.8
    Linux: "Linux modxcma 3.0.42-0.7-default #1 SMP Tue Oct 9 11:58:45 UTC 2012 (a8dc443) x86_64"
    (It's Suse Linux)

    Addins installed are Login and modActiveDirectory.

    Many thanks!

    This question has been answered by wentbackward. See the first response.

      • 32247
      • 3 Posts
      Also with debug log level set, the following appears on just about every hit on the site: [2013-04-02 08:05:19] (WARN @ /index.php) Could not load package metadata for package activedirectory.

      The whole installation is a fresh install
      • discuss.answer
        • 32247
        • 3 Posts
        ok, further update on this item. I realised I was missing something simple, I'm sure this will help others:
        - You must authenticate users somehow (i.e. the Login addon)
        - The system requires you to log in with your windows credentials, it is not using NTLM
        - There is a Plugin which is triggered on the system events onManagerAuthentication, onUserNotFound & onWebAuthentication

        At the point of logging in with Windows credentials, modActivedirectory will hit the AD and get the user info block, by logging into the AD with the credentials provided (therefore it does not need the admin credentials supplied).

        I've now discovered a further problem (should I raise this elsewhere in a ticketing system??). I noted that the mAD would create the user in MODX but not fill in the details, with a bit of debug logging I determined the following line would fail in onusernotfound.php:
        $user->Profile =& $profile;


        I simply don't know enough about PHP to get an actual trace, all I know is it didn't make it past this line of code. As a profile save immediate precedes this line, was indeed working and I could see that onauthentication.php fills out the profile again, along with the user added to the appropriate groups (depending on settings), I simply commented out this line. The onWebAuthentication event must surely be fired next in all cases I could think of! Commenting out that line worked and the users are now created fully when logging on using AD credentials.