[Davical-general] AD group synchronisation

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

[Davical-general] AD group synchronisation

Philipp Neuser

first of all, thanks for the great work on DAViCal, it is a really nice
We are using DAViCal with Active Directory authentication in our
department and wanted to sync the groups from Active Directory, too. It
seems that the normal matching by username in the ldapDrivers class  in
the member attribute of groups in AD ldap schema is not possible, cause
there ist not the sAMAccountName used but the distinguishedName.
I've written a little patch to get this working. It's not the nicest
piece of code, but perhaps it helps to support group sync from AD in
future releases.

I've added the following lines to your example configuration for AD and
the patch in the attachment to the drivers_ldap.php.

'baseDNGroups' => 'DC=example,DC=local',
     'filterGroups' => '(objectCategory=group)',

     'mapping_field'     => array("username" => "sAMAccountName",
                                  "fullname" => "cn" ,
                                  "email"    => "mail",
                                  "updated"  => "whenChanged"),
     'group_mapping_field' => array("username" => "sAMAccountName",
                              "updated" => "whenChanged",
                              "fullname" => "cn" ,
                              "members" =>"member",
                              "distinguishedName" =>"distinguishedName"
     'active_directory_hack' => true,


Forrester Wave Report - Recovery time is now measured in hours and minutes
not days. Key insights are discussed in the 2010 Forrester Wave Report as
part of an in-depth evaluation of disaster recovery service providers.
Forrester found the best-in-class provider in terms of services and vision.
Read this report now!  http://p.sf.net/sfu/ibm-webcastpromo
Davical-general mailing list
[hidden email]

patch-ad-groups-drivers_ldap.php.diff (2K) Download Attachment