Ok, it seems obvious now.
I don't have an inetorgperson objectclass in this test schema so, getAllFilter and getOneFilter will never work like this.

Thanks for the help Sébastien

--
JaimeC


On 01-05-2014 07:15, Sébastien Bahloul wrote:

Hi Jaime,

Can you check tour objectclass of your destination entry ? I would say that it is missing inetorgperson.

Regards,

Le 30 avr. 2014 20:15, "Jaime Cardoso" <[email protected] <mailto:[email protected]>> a écrit :

    Hello All

    Here's what I hope to be a really simple question:

    I have an OpenDJ ldap server with it's users synced from AD. Now,
    I want to add some attributes to the sync agreement but, whenever
    I run my sync task (lsc -s usersSync ) I get:
    entry cn=admtfileshareuser02,dc=externos,dn=QUA cannot be added
    because an entry with that name already exists]; remaining name
    'cn=admtfileshareuser02'
    basically, lsc is doing an changetype: add while I wanted it to
    switch to an changetype: modify with the remaining attributes.

    Where is my fail?



    <?xml version="1.0" ?>
    <lsc xmlns="http://lsc-project.org/XSD/lsc-core-2.0.xsd"; revision="0">

      <connections>
        <ldapConnection>
          <name>dst-ldap</name>
          <url>ldap://localhost:389/dc=externos,dc=QUA</url>
          <username>cn=directory Manager</username>
          <password>password</password>
          <authentication>SIMPLE</authentication>
          <referral>IGNORE</referral>
          <derefAliases>NEVER</derefAliases>
          <version>VERSION_3</version>
          <pageSize>-1</pageSize>
    <factory>com.sun.jndi.ldap.LdapCtxFactory</factory>
          <tlsActivated>false</tlsActivated>
    <saslMutualAuthentication>false</saslMutualAuthentication>
        </ldapConnection>

        <ldapConnection>
          <name>source-ad</name>
          <url>ldap://10.10.10.1:3268/DC=QUA,DC=local
    <http://10.10.10.1:3268/DC=QUA,DC=local></url>
          <username>CN=jaimec,DC=QUA,DC=local</username>
          <password>password</password>
          <authentication>SIMPLE</authentication>
          <pageSize>500</pageSize>
        </ldapConnection>

      </connections>
      <audits/>
      <tasks>
        <task>
          <name>usersSync</name>
          <bean>org.lsc.beans.SimpleBean</bean>
          <ldapSourceService>
            <name>usersSync-src</name>
            <connection reference="source-ad" />
            <baseDn>DC=iefp,DC=local</baseDn>
            <pivotAttributes>
              <string>cn</string>
              <string>samaccountname</string>
            </pivotAttributes>
            <fetchedAttributes>
              <string>cn</string>
              <string>sn</string>
              <string>givenName</string>
              <string>mail</string>
              <string>sAMAccountName</string>
              <string>pager</string>
              <string>title</string>
              <string>department</string>
              <string>wwwHomePage</string>
              <string>company</string>
            </fetchedAttributes>
    <getAllFilter>(&amp;(cn=*)(objectClass=user))</getAllFilter>
    
<getOneFilter>(&amp;(objectClass=organizationalPerson)(samaccountname={samaccountname}))</getOneFilter>
    
<cleanFilter>(&amp;(objectClass=organizationalPerson)(cn={cn}))</cleanFilter>
            <interval>6</interval>
          </ldapSourceService>
          <ldapDestinationService>
            <name>usersSync-dst</name>
            <connection reference="dst-ldap"/>
            <baseDn>dc=externos,dn=QUA</baseDn>
            <pivotAttributes>
              <string>cn</string>
              </pivotAttributes>
            <fetchedAttributes>
              <string>cn</string>
              <string>sn</string>
              <string>objectClass</string>
              <string>givenName</string>
              <string>mail</string>
              <string>pager</string>
              <string>samaccountname</string>
              <string>title</string>
              <string>department</string>
              <string>wwwHomePage</string>
              <string>company</string>
              <string>physicalDeliveryOfficeName</string>
              <string>ds-pwp-password-policy-dn</string>
            </fetchedAttributes>
    <getAllFilter>(objectClass=inetOrgPerson)</getAllFilter>
    <getOneFilter>(&amp;(objectClass=inetOrgPerson)(cn={cn}))</getOneFilter>
          </ldapDestinationService>
          <propertiesBasedSyncOptions>
            <mainIdentifier>"cn=" + srcBean.getDatasetFirstValueById("cn")
            </mainIdentifier>
            <defaultDelimiter>;</defaultDelimiter>
            <defaultPolicy>FORCE</defaultPolicy>
            <dataset>
              <name>objectClass</name>
              <policy>FORCE</policy>
              <forceValues>
                <string>"top"</string>
                <string>"IEFPuser"</string>
                <string>"AD-LDAP-Hack"</string>
              </forceValues>
              <delimiter>,</delimiter>
            </dataset>
            <dataset>
              <name>ds-pwp-password-policy-dn</name>
              <policy>FORCE</policy>
             <forceValues>
               <string>"cn=AD PTA policy,cn=Password
    Policies,cn=config"</string>
             </forceValues>
            </dataset>
            <dataset>
              <name>default</name>
              <policy>FORCE</policy>
            </dataset>
            </propertiesBasedSyncOptions>
        </task>
      </tasks>
    </lsc>

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

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


_______________________________________________________________
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