Tuesday, November 24, 2015

Using LDIF to Create a New User


In this example, you use LDIF to add a new user named James Smith to the Marketing organizational unit.
  1. Start a text editor, such as Notepad, and create a new text file named Newuser.ldf. (Save the file as an ldif file, not as a text file.)
  2. Edit the LDIF file Newuser.ldf, and add the following text (see Figure 4 below):
    dn: CN=JamesSmith,OU=Marketing,DC=reskit,DC=com
    changetype: add
    cn: James Smith
    objectClass: user
    samAccountName: James
    > givenName: James
    > sn: Smith
  3. Save and close the LDIF file.
  4. Run LDIFDE to import the new user into Active Directory. On the Start menu, point to Programs, then point to Accessories, and clickCommand Prompt. Type the following command, and then press Enter.
    ldifde –i -f newuser.ldf -s hq-res-dc-01
  5. To confirm that the new user has been created, check the Active Directory Users and Computers snap-in.
    Bb727091.bulkst04(en-us,TechNet.10).gif
    Figure 4: Adding a new user to the Marketing OU

No comments:

Post a Comment