On 25/07/12 15:15, Clément OUDOT wrote: > > Le 25 juil. 2012 04:35, "Robin Garner" <[email protected] > <mailto:[email protected]>> a écrit : >> >> I have an LSC task synchronizing our legacy Sun Directory Server with >> Redhat DS (aka 389). >> >> Apparently the 389 server returns object class values in a different >> capitalization to the Sun directory for some entries - I suspect it >> copies whatever was used when the entry was created, which could have >> been one of several sources. For example, a typical entry in the > source has >> >> organizationalPerson, icscalendaruser, inetadmin, >> inetlocalmailrecipient, inetmailuser, inetsubscriber, >> iplanet-am-managed-person, iplanet-am-user-service, iplanetpreferences, >> ipuser, person, eduPerson, SunUCPreferences, inetUser, >> userpresenceprofile, inetOrgPerson, top >> >> and in the destination >> >> eduperson, person, inetorgperson, krbprincipalaux, krbTicketPolicyAux, >> organizationalperson, inetuser, top >> >> I'm seeing errors like this >> >> > Jul 25 11:32:17 - ERROR - Error while modifying entry > uid=22026033,ou=Student,o=scu.edu.au > <http://scu.edu.au>,dc=scu,dc=edu,dc=au in directory > :javax.naming.directory.AttributeInUseException: [LDAP: error code 20 - > Attribute Or Value Exists]; remaining name 'uid=22026033,ou=Student' >> > Jul 25 11:32:17 - ERROR - Error while synchronizing ID > uid=22026033,ou=Student,o=scu.edu.au > <http://scu.edu.au>,dc=scu,dc=edu,dc=au: java.lang.Exception: Technical > problem while applying modifications to the destination >> > Jul 25 11:32:17 - DEBUG - java.lang.Exception: Technical problem > while applying modifications to the destination >> > java.lang.Exception: Technical problem while applying modifications > to the destination >> > at org.lsc.SynchronizeTask.run(AbstractSynchronize.java:760) > [classes/:na] >> > at org.lsc.SynchronizeTask.run(AbstractSynchronize.java:658) > [classes/:na] >> > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) > [na:1.7.0_06-ea] >> > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) > [na:1.7.0_06-ea] >> > at java.lang.Thread.run(Thread.java:722) [na:1.7.0_06-ea] >> > dn: uid=22026033,ou=Student,o=scu.edu.au > <http://scu.edu.au>,dc=scu,dc=edu,dc=au >> > changetype: modify >> > add: objectClass >> > objectClass: organizationalPerson >> > objectClass: eduPerson >> > objectClass: inetOrgPerson >> > objectClass: inetUser >> >> In the config, the syncOptions for objectClass say >> >> > <dataset> >> > <name>objectClass</name> >> > <policy>MERGE</policy> >> > <defaultValues></defaultValues> >> > <forceValues> >> > <string>"top"</string> >> > <string>"person"</string> >> > <string>"eduPerson"</string> >> > <string>"inetOrgPerson"</string> >> > <string>"inetUser"</string> >> > <string>"organizationalPerson"</string> >> > </forceValues> >> > <createValues> >> > </createValues> >> > <delimiter>,</delimiter> >> > </dataset> >> >> Is there a way of making the comparison case-blind ? Looking through >> the directory, it looks like some entries are all lower case, while some >> are camel-cased, so there is no one correct capitalization to match the >> 'force' values to. >> >> cheers, >> Robin > > I do not think it is possible, but why do you need to merge objectclass? > In general we just force values in creation. > > A workaround can also be to use a javascript code to merge values. > > Clement
The particular use case is that we have a small handful of users who have an attribute from the eduPerson schema. If/when they need this attribute they get the objectClass and the attribute, so the first time LSC synchronizes the user they may not have it, but can acquire it later. If I'd known we were going to use this attribute, I could have created all the users in 389 with this object class, but it only started being used after the new directory went live. Could you briefly outline how you think I could do the merge in JavaScript ? Thanks, Robin _______________________________________________________________ Ldap Synchronization Connector (LSC) - http://lsc-project.org lsc-users mailing list [email protected] http://lists.lsc-project.org/listinfo/lsc-users

