Answered by:
LDIFDE error

-
Hi
I am trying to Import users newusers.ldf with LDIFDE. here is the file contents but i am getting error is there any one can help. thanks in advance. here is LDF file
DN: cn=April Stewart,OU=People,DC=Contoso,DC=com
ChangeType: add
CN: April Stewart
objectClass: user
sAMAccountName: april.stewart
userPrincipleName: april.stewart@contoso.com
givenName: April
sn: Stewart
displayName: Stewart, April
mail: april.stewart@contoso.com
description: salesRepresentative in the USA
title: Sales representative
Department: Sales
company: Contoso, Ltd.
DN: CN=Tony Krignen,OU=People,DC=Contoso,DC=com
changeType: add
CN:Tony Krignen
objectClass: user
sAMAccountName: tony.Krignen
userPrincipleName: tony.Krignen@contoso.com
givenName: tony
sn: Krignen
displayName: Krignen, tony
mail: tony.krignen@contoso.com
description: salesRepresentative in the USA
title: Sales representative
Department: Sales
company: Contoso, Ltd.This is the error i am getting, as far as i know i am fallowing MSpress book instruction and there is no typo it is same as book says.
C:\Users\Administrator\Documents>ldifde -i -f Newusers.ldf -k
Connecting to "SERVER01.CONTOSO.COM"
Logging in as current user using SSPI
Importing directory from file "Newusers.ldf"
Loading entries.
Add error on entry starting on line 1: No Such Attribute
The server side error is: 0x57 The parameter is incorrect.
The extended server error is:
00000057: LdapErr: DSID-0C090C26, comment: Error in attribute conversion operati
on, data 0, v1771
0 entries modified successfully.
An error has occurred in the program
No log files were written. In order to generate a log file, please
specify the log file path via the -j option.C:\Users\Administrator\Documents>
Question
Answers
-
Hello,
change userPrincipleName in userPrincipalName and try again. Unfortunal the error is pointing out line 1 but the complete error states about a wrong attribute name.
Best regards Meinolf Weber Disclaimer: This posting is provided "AS IS" with no warranties, and confers no rights.- Marked as answer by Mervyn ZhangModerator Friday, June 26, 2009 1:25 AM
-
Remove the leading space in the DN: line and try again...
hth
Marcin- Marked as answer by Mervyn ZhangModerator Monday, June 08, 2009 12:18 PM
All replies
-
Remove the leading space in the DN: line and try again...
hth
Marcin- Marked as answer by Mervyn ZhangModerator Monday, June 08, 2009 12:18 PM
-
Thanks for your reply. i did remived leading space but still same problem any clue?
Microsoft Windows [Version 6.0.6001]
Copyright (c) 2006 Microsoft Corporation. All rights reserved.C:\Users\Administrator>cd %username%\documents
The system cannot find the path specified.C:\Users\Administrator>cd %userprofile%\documents
C:\Users\Administrator\Documents>ldefde -i -f Newuser.ldf -k
'ldefde' is not recognized as an internal or external command,
operable program or batch file.C:\Users\Administrator\Documents>ldifde -i -f Newuser.ldf -k
Connecting to "server01.contoso.com"
Logging in as current user using SSPI
Importing directory from file "Newuser.ldf"
Loading entries.
Add error on entry starting on line 1: No Such Attribute
The server side error is: 0x57 The parameter is incorrect.
The extended server error is:
00000057: LdapErr: DSID-0C090C26, comment: Error in attribute conversion operati
on, data 0, v1771
0 entries modified successfully.
An error has occurred in the program
No log files were written. In order to generate a log file, please
specify the log file path via the -j option.C:\Users\Administrator\Documents>
-
Hello,
change userPrincipleName in userPrincipalName and try again. Unfortunal the error is pointing out line 1 but the complete error states about a wrong attribute name.
Best regards Meinolf Weber Disclaimer: This posting is provided "AS IS" with no warranties, and confers no rights.- Marked as answer by Mervyn ZhangModerator Friday, June 26, 2009 1:25 AM
-
-
Having located this thread to solve a problem I had...
noticed that the answer had actually been given to this by Meinolf Weber....
simple spelling mistake...... "userPrincipalName" as opposed to userPrincipleName"
Thanks to all for the posts - really useful when trying to navigate through the various errors in the 70-640 book labs
Kind regards
Chas- Proposed as answer by chasarob Sunday, June 28, 2009 2:23 PM
-
This is solution. You should remove two lines from attribiute one is "Title" second is "Company" after modify your code must look like this
DN: cn=April Stewart,OU=People,DC=Contoso,DC=com
ChangeType: add
CN: April Stewart
objectClass: user
sAMAccountName: april.stewart
userPrincipleName: april.stewart@contoso.com
givenName: April
sn: Stewart
displayName: Stewart, April
mail: april.stewart@contoso.com
description: salesRepresentative in the USA
Department: Sales
DN: CN=Tony Krignen,OU=People,DC=Contoso,DC=com
changeType: add
CN:Tony Krignen
objectClass: user
sAMAccountName: tony.Krignen
userPrincipleName: tony.Krignen@contoso.com
givenName: tony
sn: Krignen
displayName: Krignen, tony
mail: tony.krignen@contoso.com
description: salesRepresentative in the USA
Department: Sales -
Man I hate to have to add into this, but I have been struggling now for two days trying to figure this out. I have gone line by line through my script and have even gone as far as correcting everything was exactly as the book is,ensured there were no extra spaces on any lines, but still I get errors...
Here is my LDIFDE
DN: CN=April Stewart,OU=People,DC=contoso,DC=com
changeType: add
CN: April Stewart
ObjectClass: user
sAMAccountName: april.stewart
userprincipalname: april.stewart@contoso.com
givenName: April
sn: stewart
displayName: stewart, april
mail: april.stewart@contoso.com
Description: Sales representative in the USA
title: Sales Representative
department: sales
company: contoso, ltd.
DN: CN=tony Krijnen,OU=people,DC=contoso,DC=com
changeType: add
CN: tony Krijnen
ObjectClass: user
sAMAccountName: Krijnen, tony
userprincipalname: tony.Krijnen@contoso.com
givenName: Tony
sn: Krijnen
displayname: Krijnen, tony
mail: tony.Krijnen@contoso.com
Description: Sales representative in the Netherlands
title: Sales representative
department: sales
company: contoso, ltd.Here is my error
C:\Users\Administrator\Documents>ldifde -i -f newusers.ldf
Connecting to "SERVER01.contoso.com"
Logging in as current user using SSPI
Importing directory from file "newusers.ldf"
Loading entries.
Add error on entry starting on line 1: No Such Attribute
The server side error is: 0x57 The parameter is incorrect.
The extended server error is:
00000057: LdapErr: DSID-0C090C26, comment: Error in attribute conversion operati
on, data 0, v1771
0 entries modified successfully.
An error has occurred in the program
No log files were written. In order to generate a log file, please
specify the log file path via the -j option.
-
-
Thats the book I am using as well zakariyarazi and I have been stuck for days trying to figure it out. I cant see anything wrong with my syntax and (what I tried to say above) even went as far as checking the letter case to be correct.
I guess I can just create the user accounts manually, but I really dont want to skip ahead and miss something important! If anyone can tell me where I am going wrong i sure would be grateful! I have tried all of the suggestions and even tried removing lines one at a time!!
-
Man Ok... I cant believe with as much scouring as I did I missed this detail. I guess it is because I am not fully familiar with the formats I need yet. Be VERY careful when creating this as the slightest mistake will throw the whole thing off. I am not sure what i did for the first entry but the "Tony Krijnen" error I made is in bold below. Hope this helps you out in finding where it is going wrong! zakariyarazi.
DN: CN=April Stewart,OU=People,DC=contoso,DC=com
changeType: add
CN: April Stewart
ObjectClass: user
sAMAccountName: april.stewart
userprincipalname: april.stewart@contoso.com
givenName: April
sn: stewart
displayName: stewart, april
mail: april.stewart@contoso.com
Description: Sales representative in the USA
title: Sales Representative
department: sales
company: contoso, ltd.
DN: CN=tony Krijnen,OU=people,DC=contoso,DC=com
changeType: add
CN: tony Krijnen
ObjectClass: user
sAMAccountName: Krijnen, tony (This should have been tony.krijnen)
userprincipalname: tony.Krijnen@contoso.com
givenName: Tony
sn: Krijnen
displayname: Krijnen, tony
mail: tony.Krijnen@contoso.com
Description: Sales representative in the Netherlands
title: Sales representative
department: sales
company: contoso, ltd.After correcting it, I am now able to move on.. Woo-hoo!!
-
userPrincipalName is NOT misspelt.
The problem is pretty simple, but very easy to miss. There should be a space between cn: and the user name. instead of cn:April Stewart it should be cn: April StewartCopy and paste the text below, it will fix the problem. Good luck with the exam
DN:cn= April Stewart,OU=People,DC=contoso,DC=com
ChangeType:add
CN:April Stewart
objectClass:user
samAccountName:april.stewart
userPrincipalName:april.stewart@contoso.com
givenName:April
sn:Stewart
displayName:Stewart, April
mail:april.stewart@contoso.com
description:salesRepresentative in the USA
Department:Sales
DN:CN= Tony Krignen,OU=People,DC=contoso,DC=com
changeType:add
CN:Tony Krignen
objectClass:user
samAccountName:tony.Krignen
userPrincipalName:tony.Krignen@contoso.com
givenName:tony
sn:Krignen
displayName:Krignen, tony
mail:tony.krignen@contoso.com
description:salesRepresentative in the USA
Department:Sales -
-
-
-
-
-
-
When dealing with LDIFDE you must be very conscious of that single space after the colon (dn:<SPACE>CN=April...). Also every object must be separated by ONLY ONE blank line (denoted by <CR> in the example below). I have also had issues if I did not have one blank line before the first object and after the last object in the file (see below). Now I did not test this import file but it matches the layout of the working exports/imports I have done including the order of the attributes and the character case. I do not believe case and order are important but I always see dn:, changetype:, and objectClass: as the first three attributes.
<CR>
dn: CN=April Stewart,OU=People,DC=contoso,DC=com
changetype: add
objectClass: user
cn: April Stewart
sn: Stewart
title: Sales Representative
description: Sales Representative in the USA
givenName: April
displayName: Stewart, April
department: Sales
company: Contoso, Ltd.
userPrincipalName: april.stewart@contoso.com
sAMAccountName: april.stewart
mail: april.stewart@contoso.com
<CR>
dn: CN=Tony Krijnen,OU=People,DC=contoso,DC=com
changetype: add
objectClass: user
cn: Tony Krijnen
sn: Krijnen
title: Sales Representative
description: Sales Representative in The Netherlands
givenName: Tony
displayName: Krijnen, Tony
department: Sales
company: Contoso, Ltd.
userPrincipalName: tony.krijnen@contoso.com
sAMAccountName: tony.krijnen
mail: tony.krijnen@contoso.com
<CR>
Good luck!
-RA -
I struggled with this for over two hours and finally got it to work. I was getting an error on line 1 which made me spend a lot of time looking at line 1. I have the exact same layout as above but it still failed, the problem ended up being an extra space after userAccountControl:512 for the April Stewart entry. So just follow the above format and make sure to delete any trailing spaces after each line. Thanks everybody.
-
Correct file with all attributes for users.
DN:cn= April Stewart,OU=User Accounts,DC=contoso,DC=com
ChangeType:add
CN:April Stewart
objectClass:user
samAccountName:april.stewart
userPrincipalName:april.stewart@contoso.com
givenName:April
sn:Stewart
displayName:Stewart, April
mail:april.stewart@contoso.com
description:salesRepresentative in the USA
Department:Sales
title: Sales Representative
company: Contoso,Ltd.
unicodePwd:: IgBQAGEAJAAkAHcAMAByAGQAIgA=
userAccountControl: 512DN:CN= Tony Krijnen,OU=User Accounts,DC=contoso,DC=com
changeType:add
CN:Tony Krijnen
objectClass:user
samAccountName:tony.krijnen
userPrincipalName:tony.krijnen@contoso.com
givenName:tony
sn:Krijnen
displayName:Krijnen, tony
mail:tony.krijnen@contoso.com
description:salesRepresentative in the USA
Department:Sales
title: Sales Representative
company: Contoso,Ltd.
unicodePwd:: IgBQAGEAJAAkAHcAMAByAGQAIgA=
userAccountControl: 512- Edited by grzesiekb Monday, December 31, 2012 2:25 PM
-
I received the same error however in my case in turned out that my production schema had an attribute that was not available in my test schema. I exported the schema from prod and imported the schema to test, and then all the users imported with no error.
Arend Govaars Manatee County Schools Datacenter Engineer
- Edited by Agovar Friday, February 09, 2018 4:03 PM