Mass Import Users with individual passwords in Active Directory
I looked for a nice way to bulk import hundreds of users in one of our Active Directory’s, without hassling with ldifs, csvde’s and base64 encoded passwords.
What you need :
Domain Admin Account on AD server
CSV-like file (delimiter “;”), first column username, second column password (here the file is named logins.dat)
The Name of the OU which will be containing your new users (in our example the OU is called Name-of-OU)
What you’ll get
A simple way to import hundreds or thousands of users, without knowledge of ldifde and preparing the proper password file
How ?
On the AD server, open a DOS Prompt with admin rights (“right click-> run as Administrator”, then issue this command :
FOR /F "tokens=1,2* delims=; " %i in (logins.dat) do dsadd user "CN=%i,OU=NAME-of-OU,DC=DOMAIN,DC=LOCAL" -samid %i -pwd %j
where %i = username (1st column in our CSV-like file called logins.dat)
and %j = password (2nd column in our CSV-like file called logins.dat)
Be sure that the specified Passwords meet the minimum required complexity, or temporarily disable that annoying Group Policy
After the operation completes, your OU will be populated with the imported users.
1 pings
I’m really enjoying the design and layout of your blog. It’s a very easy on the eyes which makes it much more enjoyable for me to come here and visit more often. Did you hire out a designer to create your theme? Excellent work!…