Adding accounts to AD with LDIFDE

  • Thread starter Thread starter Paul Motsuk
  • Start date Start date
P

Paul Motsuk

'lo there

I'm attempting to add an account to AD in a test domain using
LDIFDE. The domain cosists of a single DC (w/all FSMO roles).

My input file is:
-=-=-=-=-=-=-=-=-=-=-=

dn: CN=Bansal,OU=Users OU,DC=cua,DC=edu
changetype: add
cn: BANSAL
objectClass: user
SamAccountName: BANSAL
sn: Bansal
-
-=-=-=-=-=-=-=-=-=-=-=

I'm using the following command line:

ldifde -i -b <User name> cua.edu <Password> -v -f bansal.ldf -s
portaldc01 -k

The output I'm currently getting is:
-=-=-=-=-=-=-=-=-=-=-=
Connecting to "portaldc01"
Logging in as "<User name>" in domain "cua.edu" using SSPI
Importing directory from file "bansal.ldf"
Loading entries

There is a syntax error in the input file
Failed on token starting with 'B' on line 8
0 entries modified successfully.
An error has occurred in the program
-=-=-=-=-=-=-=-=-=-=-=

I'm at a loss as to the problem. I've also run across constraint
issues (I forgot to save the .ldf file and real output on that one. I
could recreate it later though).

Can anyone lend some expertise?

Thanks,

Paul Motsuk ([email protected] or (e-mail address removed))
Manager, Enterprise Systems
The Catholic University of America
 
Try eliminating the "-" from the last line of the file. The hyphen is used
when you're performing a "changetype: modify" to separate the different
attributes being modifed. It's not used when you're performing a
"changetype: add" to add a new object to the directory.

RFC 2849 contains the detailed grammar for LDIF. It's available from a
number of locations, including http://www.ietf.org/rfc/rfc2849.txt.
 
Matthew Rimer said:
Try eliminating the "-" from the last line of the file. The hyphen is used
when you're performing a "changetype: modify" to separate the different
attributes being modifed. It's not used when you're performing a
"changetype: add" to add a new object to the directory.

RFC 2849 contains the detailed grammar for LDIF. It's available from a
number of locations, including http://www.ietf.org/rfc/rfc2849.txt.

--

Thanks! That was it. I can't believe it was so simple...

Paul

Paul Motsuk ([email protected] or (e-mail address removed))
Manager, Enterprise Systems
The Catholic University of America
 
Back
Top