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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

dsmod to create userAccountControl value 512

Status
Not open for further replies.

ToeKnee2

Programmer
Jun 8, 2006
21
GB
Big picture...

I'm running the following in the command shell to create 1500 users in AD.

Code:
FOR /L %i in (1,1,1500) DO dsadd user "cn=Test User%i,cn=MyUsers,dc=mydomain,dc=local" -samid testuser%i -upn testuser%i@mydomain.local -fn Test -ln User%i -display "Test User%i" -pwd P@ssw0rd -disabled no

This works fine. Once their in AD, I'm adding them to a group CN=MyUsers, then I'm using LDP sync to pull the users into a DB. However, the problem is this...

The sync is only pulling users who have a canonicalName and a userAccountControl value of 512. I can see that my improted users don't have these values through the use of the ldp.exe tool.

When I import the users, these values are not set. It appears that I have to login with the user before these values are set.

Does anyone know of anyway I can adapt my import script or run "dsmod" to set these values? Even setting a userAccountControl value of 512 for each of these users would be great.

Thanks in advanced.

Tony
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top