Re: ADAM CSVDE/LDIFDE import of DN's with backslashes in them?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Did you try:

CN=abc\5Ddefg,OU=users,DC=compan­y,DC=com

I'm not sure if that will work, but essentially it is specifying an escape
sequence "\" and the hex pair for the ASCII/UTF8 "\" character.

One thing to consider is that this is just the tip of the iceberg of the
various programming gotchas you may encounter if you use RDNs that require
escape sequences. You will make your life much easier by trying to avoid
the need for this.

Joe K.

"jeff henrichs" <jeffhenrichs@xxxxxxxxx> wrote in message
news:1119561939.624559.8900@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I have user accounts with backslashes in the name. The accounts are
being migrated from a database into an ADAM directory. Let's say a
username is of the form:

abc\defg

If I import this user via CSVDE the username becomes "abcdefg" (the
backslash is omitted). If I manually add the backslash to the user in
ADAM (add double backslash so that it becomes abc\defg again) and then
try to add the user to a group via ldifde as follows:

dn: CN=mygroup,OU=groups,DC=compan­y,DC=com
changetype: add
add: member
member: CN=abc\\defg,OU=users,DC=compan­y,DC=com

I get the following:

Connecting to "localhost"
Logging in as current user using SSPI
Importing directory from file "c:\temp\test_01.ldf"
Loading entries.
Add error on line 1: No Such Attribute
The server side error is: 0x57 The parameter is incorrect.
The extended server error is:
00000057: LdapErr: DSID-0C090AB7, comment: Error in attribute
conversion operation, data 0, va28
0 entries modified successfully.
An error has occurred in the program


I'm focussing on trying to get the LDIFDE to work right now. If I do
an export of the user the dn comes out as
CN=abc\defg,OU=users,DC=compan­y,DC=com. Trying to do an import
though doesn't seem to work, whether I add an additional escape
backslash or not.

A bit of research makes me think that I'd have to Base-64 encode the dn
and then use "dn::". I then found an online site that generates base64
encoding so I tried using

dn:: <<base64 encoded distinguishedName>>

with the original distinguishedName containing two backslashes. I still
get the same error as above.


Anyone know how to programmatically create a user with a backslash in
the name, or especially how to add such a user to an ADAM group
(preferrably via ldifde/csvde)? The reason for ldifde/csvde is that
there are tens of thousands of users and group memberships to migrate,
so we are working from spreadsheets (csvde or mail merge to ldifs)...


Thanks for any suggestions,
Jeff


.



Relevant Pages

  • Re: Unrecognized escape sequences in string literals
    ... character without knowing the context, ... '\n' maps to the string chr. ... In both cases the backslash in the literal have the same meaning: ... escape every backslash, ...
    (comp.lang.python)
  • LDIFDE/CSVDE imports for username (cn) containing a backslash?
    ... being migrated from a database into an ADAM directory. ... If I import this user via CSVDE the username becomes "abcdefg" (the ... backslash is omitted). ... I'm focussing on trying to get the LDIFDE to work right now. ...
    (microsoft.public.win2000.active_directory)
  • Re: Unrecognized escape sequences in string literals
    ... how unrecognized escape sequences are treated in Python. ... a backslash is just an ordinary character, ... Why should a backslash in a string literal be an error? ...
    (comp.lang.python)
  • Re: Doubling backslashes in JavaScript - its unorthodox, but it works...
    ... fileString = unescape; ... doesn't actually contain a backslash at the time of the attempt to ... True, but, assigning it to another variable had no impact on what was being written/alerted. ... it is always better to have the server escape it. ...
    (comp.lang.javascript)
  • ADAM CSVDE/LDIFDE import of DNs with backslashes in them?
    ... being migrated from a database into an ADAM directory. ... If I import this user via CSVDE the username becomes "abcdefg" (the ... backslash is omitted). ... I'm focussing on trying to get the LDIFDE to work right now. ...
    (microsoft.public.windows.server.active_directory)