Hello Clement,
I still cannot manage to synchronize group membership. Actually – I’m not sure what script should I use to achieve this. Currently I have this taken from your LSC 1.1 tutorial (http://lsc-project.org/wiki/documentation/1.1/tutorials/synchronizegroups): <dataset> <name>member</name> <policy>FORCE</policy> <forceValues> <string><![CDATA[var umembers = srcBean.getAttributeValuesById("uniqueMember").toArray() ; for (var i=0; i<umembers.length; i++ ) { try { umembers[i] = ldap.attribute(ldap.list( "OU=Users,OU=imported,OU=test,DC=xxx,DC=xxx","(sAMAccountName="+(srcLdap.attribute(umembers[i], 'uid').get(0) + ")" )).get(0), 'distinguishedName').get(0) } catch (e) { umembers[i]=null } } var members = new Array(); var j=0; for (var i=0; i<umembers.length; i++) { if (umembers[i]!=null) members[j++]=umembers[i] } members;]]> </string> </forceValues> </dataset> Any help kindly appreciated ;) .. and of course I remember about beer for you J Marcin Baluta Systems Administrator tyntec GmbH Semerteichstr. 54 - 56 | 44141 Dortmund, Germany T +49 231 477 90 405 | F +49 231 108 799 2 <http://www.tyntec.com/> www.tyntec.com From: Clément OUDOT [mailto:[email protected]] Sent: Montag, 17. November 2014 16:09 To: Marcin Baluta Cc: lsc-userslsc-users Subject: Re: OpenLDAP 2 LDAP synchronization 2014-11-17 15:45 GMT+01:00 Marcin Baluta <[email protected]>: You mean in js? So it will be like this: <![CDATA[js: var dstMembers = new Array(); var membersSrcDn = srcBean.getDatasetValuesById("member"); for (var i=0; i<membersSrcDn.size(); i++) { var memberSrcDn = membersSrcDn.get(i); sam = srcLdap.attribute( memberSrcDn, "distinguishedName").get(0); dstMembers.push(sam) } dstMembers; ]]> No, you need to find the DN of the user as it will be in the destination directory. You can search the destination directory with the sAMAccountName to get the corresponding dn. Clément.
_______________________________________________________________ Ldap Synchronization Connector (LSC) - http://lsc-project.org lsc-users mailing list [email protected] http://lists.lsc-project.org/listinfo/lsc-users

