[windows2000] Re: setting users

  • From: "Sullivan, Glenn" <GSullivan@xxxxxxxxxxxxxx>
  • To: "'windows2000@xxxxxxxxxxxxx'" <windows2000@xxxxxxxxxxxxx>
  • Date: Fri, 29 Aug 2003 13:15:33 -0400

D'oh... this one will only create 27 accounts.

To create the original 147, change the FOR line to

For intLoop = 40100 to 40246

HTH,

Glenn Sullivan, MCSE+I  MCDBA
David Clark Company Inc. 

-----Original Message-----
From: Sullivan, Glenn [mailto:GSullivan@xxxxxxxxxxxxxx]
Sent: Friday, August 29, 2003 10:08 AM
To: 'windows2000@xxxxxxxxxxxxx'
Subject: [windows2000] Re: setting users


VBS script?

--------Start Example-------------
Set objOU = GetObject("LDAP://cn=users,dc=DavidClark,dc=com";)

for intLoop = 40100 to 40126
  Set objUser = objOU.Create("User", "cn=" & cstr(intLoop))
  objUser.Put "sAMAccountName", cstr(intLoop)
  objUser.Put "homeDirectory", "\\sea-dc-01\HomeFolders\" & cstr(intLoop)
  objUser.Put "homeDrive", "H:"
  objUser.AccountDisabled = FALSE
  objUser.SetPassword cstr(intLoop)
  objUser.SetInfo
Next
--------End Example-------------

This example creates 147 accounts in the user container of the
DavidClark.com domain, numbered 40100 to 40126, and sets their user name to
the number, sets the password to the number, sets the home directory to be
connected to H: and point to \\sea-dc-01\HomeFolders\%UserName%, and then
enables the account.

HTH,

Glenn Sullivan, MCSE+I  MCDBA
David Clark Company Inc. 

-----Original Message-----
From: Errol Sapir [mailto:errol@xxxxxxxxxxx]
Sent: Friday, August 29, 2003 8:47 AM
To: windows2000@xxxxxxxxxxxxx
Subject: [windows2000] setting users


I have to set up a few hundred new users on our Windows 2000 server. The
username will be numbers running consecutively (say 40100- 40246).  Each
user must have his/her own home directory. Other than that all the
configuration is the same.
Is there any way of setting this up "automatically". From what I've read
each user can be individually copied from another user. Is there any way of
not having to do this one by one, manually?

TIA

Errol

********************************************************
This Week's Sponsor - RTO Software / TScale
What's keeping you from getting more from your terminal servers? Did you
know, in most cases, CPU Utilization IS NOT the single biggest constraint to
scaling up?! Get this free white paper to understand the real constraints &
how to overcome them. SAVE MONEY by scaling-up rather than buying more
servers.
http://www.rtosoft.com/Enter.asp?ID=148
**********************************************************
To Unsubscribe, set digest or vacation
mode or view archives use the below link.

http://thethin.net/win2000list.cfm
********************************************************
This Week's Sponsor - RTO Software / TScale
What's keeping you from getting more from your terminal servers? Did you
know, in most cases, CPU Utilization IS NOT the single biggest constraint to
scaling up?! Get this free white paper to understand the real constraints &
how to overcome them. SAVE MONEY by scaling-up rather than buying more
servers.
http://www.rtosoft.com/Enter.asp?ID=148
**********************************************************
To Unsubscribe, set digest or vacation
mode or view archives use the below link.

http://thethin.net/win2000list.cfm
********************************************************
This Week's Sponsor - RTO Software / TScale
What's keeping you from getting more from your terminal servers? Did you know, 
in most cases, CPU Utilization IS NOT the single biggest constraint to scaling 
up?! Get this free white paper to understand the real constraints & how to 
overcome them. SAVE MONEY by scaling-up rather than buying more servers.
http://www.rtosoft.com/Enter.asp?ID=148
**********************************************************
To Unsubscribe, set digest or vacation
mode or view archives use the below link.

http://thethin.net/win2000list.cfm

Other related posts: