General discussion

Locked

Windows 2000 Accounts

By Jabulani ·
What is the best/simplest way to automate the creation of Windows 2000 user accounts.
Are there any NT command line options that could be used in a batch file. Or would a program script (VB or Pearl etc) be better.

Thanks

This conversation is currently closed to new comments.

5 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Windows 2000 Accounts

by jrubinstein In reply to Windows 2000 Accounts

I can't claim any credit for the following which is straight from a recent techrepublic tip, but I think it does answer your question, hope so anyway.

"Today's Windows 2000 Server Tip

CREATING USER ACCOUNTS WITH ADSI SCRIPTS
Microsoft provided a special Active Directory Services Interface (ADSI)
that allows administrators very easy interaction with Active Directory.
You can use simple scripts or complicated C programs to read from or
write to the Directory Service. As an administrator you don't need to
know all the secrets behind the ADSI, but you should know some basics,
because ADSI can be used for automating many administrative tasks.

Simple scripts could even allow you to create a simple Web page that
would include the necessary functions to remotely control your network.
You could generate scripts to create user accounts or groups, change
passwords, extend the schema, and perform many other administrative
tasks.

Here is a sample script written in VBScript that creates one user
account and one Global group, and puts the user in this group. You have
to save this script in a file with the .vbs extension and then run it.

' you will have to change this line and
' modify the LDAP path for your domain
Set adsUserC = GetObject ("LDAP://cn=Users,dc=domena,dc=local")

' this will create a user account - John Smith
Set adsUser = adsUserC.Create("user", "cn=John Smith")
adsUser.Put "sAMAccountName", "johns"
adsUser.SetInfo

'this will create Global group - Hresouces
Set adsGroup = adsUserC.Create("group","cn=HResources")
adsGroup.Put "sAMAccountName", "HResources"
adsGroup.SetInfo

' this will add the user to the group
adsGroup.Add(adsUser.ADsPath)

WScript.Echo "Done""

Collapse -

Windows 2000 Accounts

by Jabulani In reply to Windows 2000 Accounts

Poster rated this answer

Collapse -

Windows 2000 Accounts

by EastExpert In reply to Windows 2000 Accounts

There is also a command-line utility in Windows 2000 Resource Kit, called ADDUSERS.EXE.

It also can instantly add newly created users to a Windows group.
Works under NT also, only Terminal Services Options are absent.

Read more at http://support.microsoft.com/support/kb/articles/Q199/8/78.ASP ... There are also other support articles on this program, go to Search Microsoft and type in ADDUSERS .

Collapse -

Windows 2000 Accounts

by Jabulani In reply to Windows 2000 Accounts

Poster rated this answer

Collapse -

Windows 2000 Accounts

by Jabulani In reply to Windows 2000 Accounts

This question was closed by the author

Back to Windows Forum
5 total posts (Page 1 of 1)  

Related Discussions

Related Forums