I don't know if this is still an issue for some users - the last post in the thread was in August 2009 - but thought I'll post our solution, just in case it helps anyone.
As suggested in this post http://moodle.org/mod/forum/discuss.php?d=88626
, our solution consists of
- a Perl script connects to AD LDAP and grabs all the records
- a hack to function sync_users() in auth/auth.php to invoke the Perl script and return the results in an array
- the contents of the array are used to populate the temp table created in auth/auth.php
The solution requires that Perl and the Perl-LDAP libraries be installed. On Centos/RedHat/Fedora systems, that's a simple yum install perl-LDAP
. Unfortunately I don't know how easy or difficult it would be to get them installed on other Unix or Linux flavours or on Windows boxes.
I'm attaching the perl script and the code fragment in auth/auth.php
that calls it (we're using a heavily hacked auth/auth.php
, so attaching the whole file won't make a lot of sense, but hopefully, it shouldn't be too difficult to make sense of the attached code snippet).
Maybe in future we'll package the solution as a separate module, or incorporate it as a configurable option in the current module.
Hope this helps someone.