Hi Clement,

This had the effect that all the members have been deleted in the AD group.

Oct 19 14:19:15 - INFO  - # Updating object 
CN=ou-is,OU=FHgroups,DC=ad,DC=abc,DC=net for groups
dn: CN=ou-is,OU=FHgroups,DC=ad,DC=abc,DC=net
changetype: modify
delete: member

chris

On Oct 19, 2012, at 9:49 , Clément OUDOT <[email protected]> wrote:

> Do to use "new Array();" when declaring members var. Just declare it
> with "var members;".
> 
> Clément.
> 
> 2012/10/18 Christian Bösch <[email protected]>:
>> I get this error:
>> 
>> ---
>> Oct 18 09:46:38 - INFO  - Starting sync for groups
>> Oct 18 09:46:38 - ERROR - Error while modifying entry
>> CN=ou-is,OU=FHgroups,DC=ad,DC=abc,DC=net in directory
>> :javax.naming.OperationNotSupportedException: [LDAP: error code 53 -
>> 0000054F: SvcErr: DSID-031A120C, problem 5003 (WILL_NOT_PERFORM), data 0
>> ]; remaining name 'CN=ou-is,OU=FHgroups'
>> Oct 18 09:46:38 - ERROR - Error while synchronizing ID
>> CN=ou-is,OU=FHgroups,DC=ad,DC=abc,DC=net: java.lang.Exception: Technical
>> problem while applying modifications to the destination
>> dn: CN=ou-is,OU=FHgroups,DC=ad,DC=abc,DC=net
>> changetype: modify
>> replace: member
>> member: sun.org.mozilla.javascript.NativeArray@57ae58
>> ---
>> 
>> running with this task:
>> 
>> ---
>>     <task>
>>      <name>groups</name>
>>      <bean>org.lsc.beans.SimpleBean</bean>
>>      <ldapSourceService>
>>        <name>src-openldap-groups</name>
>>        <connection reference="openldap" />
>>       <baseDn>ou=groups-static,dc=abc,dc=net</baseDn>
>>        <pivotAttributes>
>>          <string>cn</string>
>>        </pivotAttributes>
>>        <fetchedAttributes>
>>          <string>cn</string>
>>          <string>member</string>
>>        </fetchedAttributes>
>>        <!--
>> <getAllFilter>(&amp;(|(cn=auat-*)(cn=ou-*))(!(cn=ou-sho)))</getAllFilter>
>> -->
>>        <getAllFilter>(&amp;(cn=ou-is))</getAllFilter>
>> 
>> <getOneFilter>(&amp;(objectClass=groupofnames)(cn={cn}))</getOneFilter>
>> 
>> <cleanFilter>(&amp;(objectClass=groupofnames)(cn={cn}))</cleanFilter>
>>      </ldapSourceService>
>>      <ldapDestinationService>
>>        <name>dst-ad-groups</name>
>>        <connection reference="active-directory" />
>>        <baseDn>OU=FHgroups,DC=ad,DC=abc,DC=net</baseDn>
>>        <pivotAttributes>
>>          <string>cn</string>
>>        </pivotAttributes>
>>        <fetchedAttributes>
>>          <string>cn</string>
>>          <string>member</string>
>>        </fetchedAttributes>
>>        <!-- <getAllFilter>(objectClass=group)</getAllFilter> -->
>>        <getAllFilter>(cn=ou-is)</getAllFilter>
>>        <getOneFilter>(&amp;(objectClass=group)(cn={cn}))</getOneFilter>
>>      </ldapDestinationService>
>>      <propertiesBasedSyncOptions>
>>        <mainIdentifier>"CN=" + srcBean.getDatasetFirstValueById("cn") +
>> ",OU=FHgroups,DC=ad,DC=abc,DC=net"</mainIdentifier>
>>        <defaultDelimiter>$</defaultDelimiter>
>>        <defaultPolicy>FORCE</defaultPolicy>
>>        <dataset>
>>          <name>member</name>
>>          <policy>FORCE</policy>
>>          <forceValues>
>>            <string><![CDATA[
>>              var umembers =
>> srcBean.getDatasetValuesById("member").toArray();
>>              for (var i=0; i<umembers.length; i++ ) {
>>                try {
>>                  umembers[i] = ldap.attribute(ldap.list( "OU=FHusers",
>> "(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>
>>      </propertiesBasedSyncOptions>
>>    </task>
>> ---
>> 
>> chris
>> 
>> On Oct 18, 2012, at 9:06 , Clément OUDOT <[email protected]> wrote:
>> 
>> 2012/10/18 Christian Bösch <[email protected]>:
>> 
>> Hi Clement,
>> 
>> Should this also be possible in version 2.0.1?:
>> http://lsc-project.org/wiki/documentation/1.1/tutorials/synchronizegroups
>> 
>> I can't get it running...
>> 
>> 
>> Yes it is possible, it is just javascript code. Replace getAttribute*
>> function by getDataset* functions, and it should work.
>> 
>> Clément.
>> 
>> 

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________________________
Ldap Synchronization Connector (LSC) - http://lsc-project.org

lsc-users mailing list
[email protected]
http://lists.lsc-project.org/listinfo/lsc-users

Reply via email to