Le 24 octobre 2011 14:48, Anna Panagidou <[email protected]> a écrit : > Hi again, > > I filter on my name so that I test first but the same thing happens when I > don't filter (please see logs below). It is as if > srcBean.getAttributeValueById does not work. Is there any chance? > > New config for (sAMAccountName=*): > lsc.tasks = AD2ldap > > lsc.tasks.AD2ldap.srcService = org.lsc.jndi.SimpleJndiSrcService > lsc.tasks.AD2ldap.srcService.baseDn = OU=UsersOU > lsc.tasks.AD2ldap.srcService.filterAll = > (&(objectClass=user)(sAMAccountName=*)) > lsc.tasks.AD2ldap.srcService.pivotAttrs = sAMAccountName > lsc.tasks.AD2ldap.srcService.filterId = > (&(objectClass=user)(sAMAccountName={sAMAccountName})) > lsc.tasks.AD2ldap.srcService.attrs = description cn sn > > > lsc.tasks.AD2ldap.dstService = org.lsc.jndi.SimpleJndiDstService > lsc.tasks.AD2ldap.dstService.baseDn = ou=UsersOU > lsc.tasks.AD2ldap.dstService.filterAll = (objectClass=inetOrgPerson) > lsc.tasks.AD2ldap.dstService.pivotAttrs = uid > lsc.tasks.AD2ldap.dstService.filterId = (&(objectClass=inetOrgPerson)( > uid={sAMAccountName})) > lsc.tasks.AD2ldap.dstService.attrs = description cn sn objectClass > > lsc.tasks.AD2ldap.bean = org.lsc.beans.SimpleBean > lsc.tasks.AD2ldap.dn = "uid=" + > srcBean.getAttributeValueById("sAMAccountName") + ",ou=UsersOU" > dn.real_root = dc=velti,dc=net > > lsc.syncoptions.AD2ldap = org.lsc.beans.syncoptions.PropertiesBasedSyncOptions > lsc.syncoptions.AD2ldap.default.action = F > lsc.syncoptions.AD2ldap.objectClass.action = K > lsc.syncoptions.AD2ldap.objectClass.create_value = > "inetOrgPerson","organizationalPerson","person","top","posixAccount" > > > > Logs: > # /opt/lsc-1.2.1/bin/lsc --config /opt/lsc-1.2.1/etc/ --synchronize all > Oct 24 15:41:43 - DEBUG - Reading configuration from /opt/lsc-1.2.1/etc/ > Oct 24 15:41:43 - DEBUG - Loading configuration url: > file:/opt/lsc-1.2.1/etc/lsc.properties > Oct 24 15:41:43 - INFO - Starting sync for AD2ldap > Oct 24 15:41:43 - INFO - Connecting to LDAP server > ldap://10.1.1.10:389/dc=velti,dc=net as cn=Anna > Panagidou,OU=UsersOU,dc=velti,dc=net > Oct 24 15:41:43 - DEBUG - Using JNDI URL setting of > "ldap://10.1.1.10:389/dc=velti,dc=net??base?(objectclass=*) " > Oct 24 15:41:43 - DEBUG - Using pagedResults control for 1000 entries at a > time > Oct 24 15:41:44 - DEBUG - Adding 'K' sync type for attribute name objectClass. > Oct 24 15:41:44 - DEBUG - Adding 'F' sync type for attribute name default. > Oct 24 15:41:44 - DEBUG - Synchronizing AD2ldap for {samaccountname=etomadaki} > Oct 24 15:41:44 - INFO - Connecting to LDAP server > ldap://localhost:389/dc=velti,dc=net as cn=root,dc=velti,dc=net > Oct 24 15:41:44 - DEBUG - Using JNDI URL setting of > "ldap://localhost:389/dc=velti,dc=net??base?(objectclass=*) " > Oct 24 15:41:44 - DEBUG - In entry "uid=,ou=UsersOU": List of attributes > considered for writing in destination: [sn, cn, description, objectClass] > Oct 24 15:41:44 - DEBUG - In entry "uid=,ou=UsersOU": Attribute "sn" is in > FORCE status > Oct 24 15:41:44 - DEBUG - In entry "uid=,ou=UsersOU": Adding attribute "sn" > with values [Tomadaki] > Oct 24 15:41:44 - DEBUG - In entry "uid=,ou=UsersOU": Attribute "cn" is in > FORCE status > Oct 24 15:41:44 - DEBUG - In entry "uid=,ou=UsersOU": Adding attribute "cn" > with values [Elia Tomadaki] > Oct 24 15:41:44 - DEBUG - In entry "uid=,ou=UsersOU": Attribute > "description" is in FORCE status > Oct 24 15:41:44 - DEBUG - In entry "uid=,ou=UsersOU": Attribute > "description" will not be written to the destination > Oct 24 15:41:44 - DEBUG - In entry "uid=,ou=UsersOU": Attribute > "objectClass" is in KEEP status > Oct 24 15:41:44 - DEBUG - In entry "uid=,ou=UsersOU": Adding attribute > "objectClass" with values [posixAccount] > Oct 24 15:41:44 - ERROR - Error while adding entry uid=,ou=UsersOU in > directory :javax.naming.InvalidNameException: uid=,ou=UsersOU: [LDAP: error > code 34 - invalid DN]; remaining name 'uid=,ou=UsersOU' > Oct 24 15:41:44 - ERROR - Error while synchronizing ID uid=,ou=UsersOU: > java.lang.Exception: Technical problem while applying modifications to > directory > Oct 24 15:41:44 - DEBUG - java.lang.Exception: Technical problem while > applying modifications to directory > java.lang.Exception: Technical problem while applying modifications to > directory > at > org.lsc.AbstractSynchronize.synchronize2Ldap(AbstractSynchronize.java:399) > [lsc-core-1.2.1.jar:na] > at org.lsc.SimpleSynchronize.launchTask(SimpleSynchronize.java:272) > [lsc-core-1.2.1.jar:na] > at org.lsc.SimpleSynchronize.launch(SimpleSynchronize.java:155) > [lsc-core-1.2.1.jar:na] > at org.lsc.Launcher.run(Launcher.java:151) [lsc-core-1.2.1.jar:na] > at org.lsc.Launcher.main(Launcher.java:123) [lsc-core-1.2.1.jar:na] > dn: uid=,ou=UsersOU,dc=velti,dc=net > changetype: add > sn: Tomadaki > cn: Elia Tomadaki > objectClass: posixAccount > > Oct 24 15:41:44 - DEBUG - Synchronizing AD2ldap for {samaccountname=tneda} > Oct 24 15:41:44 - DEBUG - In entry "uid=,ou=UsersOU": List of attributes > considered for writing in destination: [sn, cn, description, objectClass] > Oct 24 15:41:44 - DEBUG - In entry "uid=,ou=UsersOU": Attribute "sn" is in > FORCE status > Oct 24 15:41:44 - DEBUG - In entry "uid=,ou=UsersOU": Adding attribute "sn" > with values [Tozija] > Oct 24 15:41:44 - DEBUG - In entry "uid=,ou=UsersOU": Attribute "cn" is in > FORCE status > Oct 24 15:41:44 - DEBUG - In entry "uid=,ou=UsersOU": Adding attribute "cn" > with values [Neda Tozija] > Oct 24 15:41:44 - DEBUG - In entry "uid=,ou=UsersOU": Attribute > "description" is in FORCE status > Oct 24 15:41:44 - DEBUG - In entry "uid=,ou=UsersOU": Attribute > "description" will not be written to the destination > Oct 24 15:41:44 - DEBUG - In entry "uid=,ou=UsersOU": Attribute > "objectClass" is in KEEP status > Oct 24 15:41:44 - DEBUG - In entry "uid=,ou=UsersOU": Adding attribute > "objectClass" with values [posixAccount] > Oct 24 15:41:44 - ERROR - Error while adding entry uid=,ou=UsersOU in > directory :javax.naming.InvalidNameException: uid=,ou=UsersOU: [LDAP: error > code 34 - invalid DN]; remaining name 'uid=,ou=UsersOU' > Oct 24 15:41:44 - ERROR - Error while synchronizing ID uid=,ou=UsersOU: > java.lang.Exception: Technical problem while applying modifications to > directory > Oct 24 15:41:44 - DEBUG - java.lang.Exception: Technical problem while > applying modifications to directory > java.lang.Exception: Technical problem while applying modifications to > directory > at > org.lsc.AbstractSynchronize.synchronize2Ldap(AbstractSynchronize.java:399) > [lsc-core-1.2.1.jar:na] > at org.lsc.SimpleSynchronize.launchTask(SimpleSynchronize.java:272) > [lsc-core-1.2.1.jar:na] > at org.lsc.SimpleSynchronize.launch(SimpleSynchronize.java:155) > [lsc-core-1.2.1.jar:na] > at org.lsc.Launcher.run(Launcher.java:151) [lsc-core-1.2.1.jar:na] > at org.lsc.Launcher.main(Launcher.java:123) [lsc-core-1.2.1.jar:na] > dn: uid=,ou=UsersOU,dc=velti,dc=net > changetype: add > sn: Tozija > cn: Neda Tozija > objectClass: posixAccount > > > and so on >
Add sAMAccountName in source attributes list : lsc.tasks.AD2ldap.srcService.attrs = description cn sn sAMAccountName _______________________________________________________________ Ldap Synchronization Connector (LSC) - http://lsc-project.org lsc-users mailing list [email protected] http://lists.lsc-project.org/listinfo/lsc-users

