Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Importing Users

Status
Not open for further replies.

DoughboyII

IS-IT--Management
Apr 10, 2001
45
0
0
US
Simple Question I hope, I have several classes I want to import on our win2k server. I have the classes in a text file in a comma delimited file. Is there a utility or does win2k have the ability to import users from a txt file? Just figured I'd ask so much to do, so little time.
 
Is there another way besides using that command? I want to import about 6 fields.
 
There is another utility called ldife. This one does not use csv files though. it uses a text file.

The LDAP Data Interchange Format (LDIF) is an Internet draft standard for a file format that can be used for performing batch operations on directories that conform to the LDAP standards. LDIF can be used to export and import data, allowing batch operations such as Add, Modify, and Delete to be performed in Active Directory. A utility called LDIFDE is included in the Windows 2000 operating system to support batch operations based on the LDIF standard.

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.)
Edit the LDIF file Newuser.ldf, and add the following text

dn: CN=JamesSmith,OU=Marketing,DC=reskit,DC=com
changetype: add
cn: James Smith
objectClass: user
samAccountName: James
> givenName: James
> sn: Smith
Save and close the LDIF file.
Run LDIFDE to import the new user into Active Directory. On the Start menu, point to Programs, then point to Accessories, and click Command Prompt. Type the following command, and then press Enter.

ldifde –i -f newuser.ldf -s hq-res-dc-01
To confirm that the new user has been created, check the Active Directory Users and Computers snap-in.

 
Addusers.exe tool to migrate user and groups to another domain. Move domain accounts to a text file by typing "net user >userlist.txt at the command prompt. Create a single column list of users prefixed with net user and suffixed with a default password and the /add switch, as in
net user username password /add
net user username2 password /add
Rename the text file to have a .bat extension and execute it on the new server.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top