Changing local admin password

0 pts.
Tags:
Security management
A few months agon I came across a software where you can change the local admins password on several machines at once. It basically grabs a list from active directory of the computers and allows you to change the password. For the life of me I can't remember where I saw it...or who made it...Does anyone out there know? I remember it started with a "K". I am sorry if this isn't the right place to ask...but someone is asking me about this software...and needs to change about 500 pc's local admin passwords...and he said he tried a script and that didn't work. Anyone know?
ASKED: June 8, 2005  12:03 PM
UPDATED: June 10, 2005  3:34 AM

Answer Wiki

Thanks. We'll let you know when a new response is added.

‘ This should work.
‘ Change Administrator password for Window XP Professional computers.

strDomainSuffix = “DC=MYDOMAIN,DC=local”

strDomain = “MYDOMAIN”
strUser = “Administrator”
strPassword = “Passw0rd”

Const ADS_SCOPE_SUBTREE = 2
Const ADS_UF_DONT_EXPIRE_PASSWD = &H10000

Set objConnection = CreateObject(“ADODB.Connection”)
Set objCommand = CreateObject(“ADODB.Command”)

objConnection.Provider = “ADsDSOObject”
objConnection.Open “Active Directory Provider”

Set objCommand.ActiveConnection = objConnection

‘ Taylor this search to return the computers you want.
objCommand.CommandText = “” _
& “select Name ” _
& “from ‘LDAP://” & strDomainSuffix & “‘ ” _
& “where objectClass=’computer’ ” _
& “and operatingSystem=’Windows XP Professional’ ” _
& “”

objCommand.Properties(“SearchScope”) = ADS_SCOPE_SUBTREE
objCommand.Properties(“Cache Results”) = False
objCommand.Properties(“Timeout”) = 300

Set objRecordSet = objCommand.Execute

objRecordSet.MoveFirst
Do Until objRecordSet.EOF
strComputer = objRecordSet.Fields(“Name”).Value

Set objUser = GetObject(“WinNT://” & strComputer & “/” & strUser & “,user”)

lUserFlags = objUser.Get(“userFlags”)
lUserFlags = lUserFlags Or ADS_UF_DONT_EXPIRE_PASSWD

objUser.Put “userFlags”, lUserFlags
objUser.SetPassword strPassword
objUser.SetInfo

objRecordSet.MoveNext
Loop

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following