JNDI / Active DIrectory - CN Values

I'm attempting to migrate a large user repository into Active Directory. I'm using the Java Directory API and inserts/modifications are working for the most part; however I'm having trouble with the CN attr -

Specifically I'd like to use email address as the CN attr value and I've run into numerous exceptions when attempting this. Does anyone know of the Naming API limitations or specific schema restrictions for the CN attr (I cannot find anything on the Microsoft site). Any workarounds would be helpful as well -

best regards,

patrick

[570 byte] By [patrickschramma] at [2007-11-26 18:36:29]
# 1

No reason that I cannot think of why you can't have a common name (cn) with a value like an e-mail address (Eg. foobar@acme.com).

The only thing to be aware of is that if the cn includes any of the LDAP special characters , = + < > # ; then they need to be escaped (refer to rfc 2253).

The only other gotcha I can think of is that you may not be able to use an email address for the samAccountName attribute, as it may be too long. IIRC, for backwards compatibility, samAccountName values are limited to 16 characters and they also have their own list of illegal characters which include / \ [ ] : ; | " = , + * ? < >

adler_stevena at 2007-7-9 6:10:31 > top of Java-index,Core,Core APIs...