none
LDIFDE error

    Question

  • 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>

    Monday, June 8, 2009 6:41 AM

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.
    Monday, June 8, 2009 7:53 PM
  • Remove the leading space in the DN: line and try again...

    hth
    Marcin
    Monday, June 8, 2009 11:26 AM

All replies

  • Remove the leading space in the DN: line and try again...

    hth
    Marcin
    Monday, June 8, 2009 11:26 AM
  • 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>

    Monday, June 8, 2009 6:52 PM
  • 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.
    Monday, June 8, 2009 7:53 PM
  • Is there an answer to this?  I'm having the same problem and I think I'm using the same book!  Thanks.
    • Proposed as answer by chasarob Sunday, June 28, 2009 2:13 PM
    Thursday, June 25, 2009 7:27 PM
  • 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
    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

    Friday, June 25, 2010 9:31 PM
  • 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.

    Sunday, August 8, 2010 6:41 PM
  • I am also experiencing the:

    No log files were written.  In order to generate a log file, please
    specify the log file path via the -j option.

    I am using the 70-640 mcts exam Microsoft training kit.

    Tuesday, August 10, 2010 5:21 PM
  • 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!!

    Tuesday, August 10, 2010 11:14 PM
  • 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!!

    Tuesday, August 10, 2010 11:51 PM
  • 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 Stewart

    Copy 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

     

    Monday, November 8, 2010 10:37 AM
  • As noted, sAMAccountName values cannot include commas.

    Richard Mueller


    MVP ADSI
    Monday, November 8, 2010 9:58 PM
  • Hi Iain I have used your copy. I am getting error unable to read file, any suggestion

    Alrick


    Alrick
    Thursday, January 27, 2011 10:54 PM
  • If you copy & paste Iains text it creates 2 lines between the text: simply remove 1 line (so there is only 1 line) and it will work :)
    Wednesday, February 16, 2011 6:42 PM
  • At first I could not get mine to work I was having the same problems as the others where.

    I just typed it out and it worked just fine. 

     

     

     

    Tuesday, January 17, 2012 4:46 PM
  • in line five you have "sAMAccoutName" I think it should be "SamAccountName"
    Wednesday, May 9, 2012 9:50 AM
  • Amazing! I actually copied and pasted your text into a new txt file, including changing Krijnen, tony to tony.krijnen, as you suggested, and I STILL get the same error. Can you show a copy of your syntax on this thread?

    Thanks,

    -ds

    Saturday, September 1, 2012 6:38 PM
  • 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
    Wednesday, September 12, 2012 9:42 PM
  • 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.
    • Proposed as answer by Riy87 Sunday, December 9, 2012 3:40 AM
    • Unproposed as answer by Riy87 Sunday, December 9, 2012 3:40 AM
    Sunday, December 9, 2012 3:40 AM
  • 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: 512

    DN: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
    Monday, December 31, 2012 2:23 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 9, 2018 4:03 PM
    Friday, February 9, 2018 4:02 PM