Hi All,

Just getting started with LSC and I'm trying to sync from LDAP (OpenDJ 2.4.3) to Active Directory (Windows Server 2008 R2). I'm starting from the configuration that was posted on this list in October 2010 ( http://lists.lsc-project.org/pipermail/lsc-users/2010-October/000471.html )

It's working well, but I'm getting into some trouble with entries that have commas and/or single quotes in the CN. Based on several posts I've read on the list it seems that escaping is the answer, but I'm having trouble getting the recipe just right. For instance, for single quotes I've tries prepending various numbers of backslashes in front of single quotes, using a construct like:

lsc.tasks.ldap2ad_user.dn = "CN=" + srcBean.getAttributeValueById("cn").split("'").join("\\\\\\\\'") + ",CN=Users"

but end up getting errors such as:

[LDAP: error code 34 - 00002081: NameErr: DSID-03050C42, problem 2003 (BAD_ATT_SYNTAX), data 0, best match of: 'CN=Seamus O'Brien,CN=Users,dc=mdibl,dc=net']; remaining name 'CN=Seamus O'Brien,CN=Users'

or

[LDAP: error code 34 - 00000057: LdapErr: DSID-0C090C13, comment: Error processing name, data 0, v1db1]; remaining name 'CN=Seamus O\\'Brien,CN=Users'

I've also tried replacing \27 in place of the single quote with similar results.

If I use SIXTEEN backslashes in front of a single quote then inserting the entry into AD will succeed, BUT some (literal) backslashes end up in the CN, DN, etc. entries, which I certainly don't want.

Commas in the DN give similar problems. Surely this problem has been definitively solved by someone... what is the special sauce that I'm missing?

I'm using LSC 1.2.2.  My lsc.properties file is at:
http://pastebin.com/09u1rTHR

Thanks for any help you may be able to provide.

--
Roy McMorran
Systems Administrator
MDI Biological Laboratory
[email protected]



_______________________________________________________________
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