LDIFDE import error Add error on line 1: No Such Attribute

I'm trying to import some contacts into our AD structure using the following command line and ldf file. Getting the error at the bottom of this post

the names have been changed to protect the innocent.

ldifde -i -f testimp.ldf -j c:\wccexport\

dn: CN=davesmith,OU=WCC Staff,OU=Recipients,OU=ExchangeResourceAccounts,OU=IT,DC=cwh,DC=pri
changetype: add
objectclass:contact
sn: davesmith
title: solicitor
physicaldeliveryofficename:  City Hall
telephonenumber: 2222
givenname: Dave
Display Name: Smith, dave
Department: CEX LegServs
Company: Our Business
streetaddress: 15th Floor, City Hall
targetaddress: SMTP:dsmith@wcaddress.gov.uk
mail: dsmith@wcaddress.gov.uk

getting this error:

Connecting to "********"
Logging in as current user using SSPI
Importing directory from file "testimp.ldf"
Loading entries.
Add error on line 1: No Such Attribute
The server side error is "The parameter is incorrect."
0 entries modified successfully.
An error has occurred in the program

I have tried variations of the Dn line, no change. I could always use csvde, I suppose...
TonyStanleyAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Netman66Commented:
According to your first line, this is what you to do:

Add user DaveSmith (note - it's all one)
to

CWH.PRI (Domain level)
     >IT Organizational Unit
          >ExchangeResourceAccounts Organizational Unit
               >Recipients Organizational Unit
                    >Staff Organizational Unit
                         >WCC Organization Unit

You need to work from bottom to top of the structure as you move left to right.  Spaces do not need to be enclosed in quotes.  So, if your first line is indeed what you want then this is the syntax:

dn: CN=Smith Dave,OU=WCC Staff,OU=Recipients,OU=Exchange Resource Accounts,OU=IT,DC=cwh,DC=pri

Advise.
0
Netman66Commented:
Sorry one, typo.  The line should read:

dn: CN=Dave Smith,OU=WCC Staff,OU=Recipients,OU=Exchange Resource Accounts,OU=IT,DC=cwh,DC=pri

I reversed the name fields.
0
TonyStanleyAuthor Commented:
Thanks for the reply.

OK I tried with the name Dave Smith and the file contents below, and still get the same message below. Am I missing something obvious. I notice you've given the OU Exchange resource accounts, but our OU is definitely without spaces:

C:\WCCExport>ldifde -i -f testimp.ldf -j c:\wccexport\

dn: CN=dave smith,OU=WCC Staff,OU=Recipients,OU=ExchangeResourceAccounts,OU=IT,DC=cwh,DC=pri
changetype: add
objectclass:contact
sn: smith
title: solicitor
physicaldeliveryofficename:  City Hall
telephonenumber: 2222
givenname: Dave
Display Name: Smith, dave
Department: CEX LegServs
Company: Our Business
streetaddress: 15th Floor, City Hall
targetaddress: SMTP:dsmith@wcaddress.gov.uk
mail: dsmith@wcaddress.gov.uk

Logging in as current user using SSPI
Importing directory from file "testimp.ldf"
Loading entries.
Add error on line 1: No Such Attribute
The server side error is "The parameter is incorrect."
0 entries modified successfully.
An error has occurred in the program
0
Cloud Class® Course: Microsoft Windows 7 Basic

This introductory course to Windows 7 environment will teach you about working with the Windows operating system. You will learn about basic functions including start menu; the desktop; managing files, folders, and libraries.

Netman66Commented:
Ok then, let's hit this from another angle.

Export your current OU to file.  Let's see what it is expecting for line # 1.

...

Try this file:

DN: CN=Dave Smith,OU=WCC Staff,OU=Recipients,OU=ExchangeResourceAccounts,OU=IT,DC=cwh,DC=pri
changetype: add
objectClass:contact
sn: Smith
title: Solicitor
physicaldeliveryofficename:  City Hall
telephonenumber: 2222
givenname: Dave
Display Name: Smith, Dave
Department: CEX LegServs
Company: Our Business
streetaddress: 15th Floor, City Hall
targetaddress: SMTP:dsmith@wcaddress.gov.uk
mail: dsmith@wcaddress.gov.uk
0
TonyStanleyAuthor Commented:
Thanks again

this is what the export returned
dn: CN=xxxxxx\, xxxxxx,OU=WCC Staff,OU=Recipients,OU=ExchangeResourceAccounts,OU=IT,DC=cwh,DC=pri
changetype: add
objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: contact
cn:xxxxx, xxxxx
sn: xxxxx
givenName: xxxxx
displayName: xxxxx, xxxxx
targetAddress: SMTP:xxxxx@xxxx.gov.uk
mail: xxxxx@xxxx.gov.uk

tried your suggested line and got the same old response....

ta

0
Netman66Commented:
Ok, now use the exported file as a template.  Plug one new user into the template file and change the switch to import and see what happens.

I notice a difference in line one from our files:

dn: CN=xxxxxx\, xxxxxx,OU=WCC Staff,OU=Recipients,OU=ExchangeResourceAccounts,OU=IT,DC=cwh,DC=pri

Difference ----^

dn: CN=Dave Smith,OU=WCC Staff,OU=Recipients,OU=ExchangeResourceAccounts,OU=IT,DC=cwh,DC=pri
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
TonyStanleyAuthor Commented:
Hi again

the syntax below works
dn: CN=smith dave,OU=WCC Staff,OU=Recipients,OU=ExchangeResourceAccounts,OU=IT,DC=cwh,DC=pri
changetype: add
objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: contact
cn: smith dave
sn: smith
etc

Is it not possible to import/modify to CNs with commas?


0
TonyStanleyAuthor Commented:
I'll give you the points anyway, as your suggestion worked

thanks a lot.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows Server 2003

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.