2012/11/7 Emeric Million <[email protected]> > Hi ! >
Hi, > I'm trying to import AD's entries to an OpenLDAP with adding some info > > I follow this part : > http://lsc-project.org/wiki/documentation/2.0/configuration/syncoptions/sequences > for > adding a uidNumber. However, it seems like lsc doesn't add it and give me > an error because I want to make a "posixAccount" without uidNumber. > > I add the > "cn=uidNumberSequence,ou=Sequences,ou=HiddenTree,dc=MyDomain,dc=int" on my > OpenLDAP, because I can't add it on the AD. (maybe that's the problem... > But I don't know how to tell the dataset which LDAP to contact for it) > As the documentation says: - you can either specify that the sequence will be looked up inside the source or the destination directory respectively with on the “srcLdap.getJndiServices()” or “ldap.getJndiServices()” So if your created the counter in destination, your code is fine because you use ldap.getJndiServices(). > > A part of my config file : > " > [...] > <propertiesBasedSyncOptions> > <mainIdentifier>"cn=" + srcBean.getDatasetFirstValueById("cn") + > ",ou=site,ou=comptes,dc=MyDomain,dc=int"</mainIdentifier> > <defaultDelimiter>;</defaultDelimiter> > <defaultPolicy>FORCE</defaultPolicy> > <dataset> > <name>uidNumber</name> > <policy>KEEP</policy> > <defaultValues> > <string>SequencesFactory.getInstance(ldap.getJndiServices()). > > getNextValue("cn=uidNumberSequence,ou=Sequences,ou=HiddenTree,dc=MyDomain,dc=int", > "uidNumber")</string> > </defaultValues> > </dataset> > > > <dataset> > <name>uid</name> > <policy>FORCE</policy> > <forceValues> > <string>srcBean.getDatasetFirstValueById("cn")</string> > </forceValues> > </dataset> > > <dataset> > <name>objectClass</name> > <policy>FORCE</policy> > <forceValues> > <string>"top"</string> > <string>"person"</string> > <string>"inetOrgPerson"</string> > <string>"organizationalPerson"</string> > <string>"posixAccount"</string> > <string>"shadowAccount"</string> > </forceValues> > </dataset> > > </propertiesBasedSyncOptions> > [...] > " > > The complete log : > " > ERROR - Error while adding entry > cn=user1,ou=site,ou=comptes,dc=MyDomain,dc=int in directory > :javax.naming.directory.SchemaViolationException: [LDAP: error code 65 - > object class 'posixAccount' requires attribute 'uidNumber']; remaining name > 'cn=user1,ou=site,ou=comptes' > nov. 07 14:57:35 - ERROR - Error while synchronizing ID > cn=user1,ou=site,ou=comptes,dc=MyDomain,dc=int: java.lang.Exception: > Technical problem while applying modifications to the destination > dn: cn=user1,ou=site,ou=comptes,dc=MyDomain,dc=int > changetype: add > uid: user1 > mail: [email protected] <[email protected]> > sn: user > cn: user1 > objectClass: organizationalPerson > objectClass: person > objectClass: posixAccount > objectClass: shadowAccount > objectClass: inetOrgPerson > objectClass: top > " > > Are you sure that uidNumber is listed in destination attributes? Clément.
_______________________________________________________________ Ldap Synchronization Connector (LSC) - http://lsc-project.org lsc-users mailing list [email protected] http://lists.lsc-project.org/listinfo/lsc-users

