Title: Sysvol Damaged
Alternatively, first set your default interpreter to be cscript with
 
cscript //h:cscript
 
This would be the recommended setting in my opinion.
 
  joe
 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Creamer, Mark
Sent: Wednesday, May 26, 2004 10:16 AM
To: [EMAIL PROTECTED]
Subject: RE: [ActiveDir] Password set and enable account

Run from the command line using cscript [script_name]

 

<mc>

-----Original Message-----
From: Douglas M. Long [mailto:[EMAIL PROTECTED]
Sent: Wednesday, May 26, 2004 10:08 AM
To:
[EMAIL PROTECTED]
Subject: RE: [ActiveDir] Password set and enable account

 

Stupid question. How do I specify wscript.echo to not require a response (hit the OK button)?

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]On Behalf Of Mulnick, Al
Sent: Monday, May 24, 2004 11:29 AM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: RE: [ActiveDir] Password set and enable account

Here's an example of one way to do that.  I would suggest that if you're wanting to put in a random password that meets your complexity requirements, that you concatenate a variable with the RAND function and then write it back out to a log file.  This example file is one that was used in the test lab and could be more efficient.  I had about 2500 users that I used and it took about a minute to execute.  Nonetheless, with minor mods, it should do what you want.

 

Let me know if I can be of any help (I'm bored ;)

 

Al

 

 

 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Douglas M. Long
Sent: Monday, May 24, 2004 9:49 AM
To: [EMAIL PROTECTED]
Subject: RE: [ActiveDir] Password set and enable account

Oh yeah, I guess I have to read the username from a file and pass it into the dsmod command also. Do I just want a list of users in a .txt file, .cvs??? And how do I read from that?

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]On Behalf Of Douglas M. Long
Sent: Monday, May 24, 2004 9:41 AM
To: [EMAIL PROTECTED]
Subject: [ActiveDir] Password set and enable account

Ok, so my task is to generate random passwords and enable the accounts for 3200 users. The user accounts and all attributes were first created with ldife, and I am now thinking about using the dsmod utility to do accomplish the password set and account enablement. I wish I knew vbs like you guys do, but I dont yet (this years resolution). So here is what I have for the password generation part:

 

 

Function Password_GenPass( nNoChars, sValidChars )
' nNoChars = length of generated password
' sValidChars = valid characters. If zerolength-string ( "" )then
' default is used: A-Z AND a-z AND 0-9

 

Const szDefault = "abcdefghijklmnopqrstuvxyzABCDEFGHIJKLMNOPQRSTUVXYZ0123456789"
Dim nCount
Dim sRet
Dim nNumber
Dim nLength

 

Randomize 'init random

 

If sValidChars = "" Then
sValidChars = szDefault
End If
nLength = Len( sValidChars )

 

For nCount = 1 To nNoChars
nNumber = Int((nLength * Rnd) + 1)
sRet = sRet & Mid( sValidChars, nNumber, 1 )
Next
Password_GenPass = sRet
End Function

 

WScript.Echo "Your password: " & Password_GenPass( 10, "" )

 

What is my next move? I am guessing I have to pass this password to a variable, instead of echo, and then somehow pass that into the dsmod command, but as I already said, I dont know vb script. Any help is highly appreciated.

 

 

Reply via email to