I tried  the substring but since most of the uids are less than 20 characters 
it causes an index out of range error. I tried logic but I'm not a java 
programmer and it's not working. Any thoughts?

# Account for uids that break the AD rule of no more than 20 characters
if (srcBean.getAttributeValueById("uid").length() > 19) { \
        lsc.tasks.user.dn = "CN=" + 
srcBean.getAttributeValueById("uid").substring(0,19) + ",CN=Users"; \
} else { \
        lsc.tasks.user.dn = "CN=" + srcBean.getAttributeValueById("uid") + 
",CN=Users"; \
        } \

-----Original Message-----
From: Clément OUDOT [mailto:[email protected]] 
Sent: Thursday, November 03, 2011 12:35 PM
To: Rohler, Brian L
Cc: [email protected]
Subject: Re: [lsc-users] LDAP: error code 53 - 00002077

Le 3 novembre 2011 17:03, Rohler, Brian L <[email protected]> a écrit :
> Can I put code around the entry in the syncopations section taking just the 
> first 20 characters?
>
> On Nov 3, 2011, at 11:57 AM, "Clément OUDOT" <[email protected]> wrote:
>
>> Le 3 novembre 2011 16:17, Rohler, Brian L <[email protected]> a écrit :
>>> I ran into a small problem where one of my users has a uid that is 22 
>>> characters in length and I received the [LDAP: error code 80 - 00000523] 
>>> error. I looked up the error and its:
>>>
>>> Active Directory has a limitation of 20 characters for the user account 
>>> name; for example, uid or cn. If you create a user with more than 20 
>>> character
>>>
>>> Is there a way around this other than shortening the users uid name?

Use the substring method :

srcBean.getAttributeValueById("uid").substring(0,19).
_______________________________________________________________
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