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!

Creating a default password for multiple users 1

Status
Not open for further replies.

maloaupito

Technical User
Jun 28, 2001
21
0
0
US
How do I create a default password for multiple users that are created from the following example .vbs file in W2K Server?

Here's what I know so far. I created a file called "users.vbs" and in the file is for example:

DN, objectclass, userAccountName, userPrincipalName
"cn=DoeJ,dc=company,dc=com",user,DoeJ,DoeJ@company.com

The above creates a user with no password if script is run from the command prompt "csvde -i -f users.vbs" .
Obviously there would be more lines in the above file with muliple users.

I want to include in users.vbs an attribute that will create a default password in line 1 with a value set in the subsequent lines of the script. I have tried the attributes userPassword, userDefaultPassword, DefaultPassword, Password all in different locations in line 1 of the script with the attribute value in the matching location in line 2 - all variations do not create any password.

What's the correct way to create a default password?

OR is there another way other than a .vbs file to create multiple users with a default password from a prepared file?

 
u can create user accounts within Active Directory by using the following script:

Set ou = GetObject("LDAP://OU=Webspiders,OU=DSys,DC=adsidev,DC=nttest,DC=webspiders,DC=com")
Set usr = ou.Create("user", "CN=Kapil Aggarwal")
'--- Mandatory Attributes----
usr.Put "samAccountName", "kapil"

'---- Optional Attributes, you can optionally skip these----
usr.Put "sn", "Kapil"
usr.Put "givenName", "Aggarwal"
usr.Put "userPrincipalName", "kapil@interwebspiders.com"
usr.Put "telephoneNumber", "234"
usr.Put "title", "Technical Director"
usr.SetInfo

Now that the user is created, reset the user's password and
enable its account

usr.SetPassword "secret***!"
usr.AccountDisabled = False
usr.SetInfo

this should help u out
Kapil Technical Director
Infovalley Interwebspiders Pvt. Ltd.
Microsoft Certified System Engineer
visit
If u find the information provided here useful to u then let me know by clicking on the link below s-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top