Home All Groups Group Topic Archive Search About

Change local admin password



Author
18 Oct 2007 7:04 AM
Miha
Hi

Is it possible and how to change local admin password on all Win2000/WinXP
computer in domain?
Can't find any function in GPO, the only way that I can think of is via
script, but it's a problem that script is run with users privileges, and
they are ordinary users not admins?
Any ideas?
Regards,
Miha

Author
18 Oct 2007 7:07 AM
Mathieu CHATEAU
Hello,

Here is a vbscript from the famous Brian Desmond.
Fill a workstations.txt with workstations names and the newPass = ""
If you don't know how to fill the text file, please let me know.
If you administrator local name is not "Administrator", change it in the
script (line WinNT://" & line & "/Administrator, user")


'==========================================================================
' NAME: Change local administrator password on list of machines
' AUTHOR: Brian Desmond
' DATE  : 6/19/2006
'==========================================================================
Option Explicit

' What to change the password to
Const newPass = ""

Const LogFile = "AdminReset.log"
Const inputFile = "workstations.txt"

Dim fso
Set fso = CreateObject("Scripting.FileSystemObject")

Dim shl
Set shl = WScript.CreateObject("WScript.Shell")

Dim fil
Set fil = fso.OpenTextFile(inputFile)

WriteToLog "Beginning Pass of " & inputFile & " at " & Now()
WScript.Echo "Beginning Pass of " & inputFile & " at " & Now()
'On Error Resume Next

Dim usr
Dim line
Dim exec
Dim pingResults
While Not fil.AtEndOfStream
line = fil.ReadLine

Set exec = shl.Exec("ping -n 2 -w 1000 " & line)
   pingResults = LCase(exec.StdOut.ReadAll)

  If InStr(pingResults, "reply from") Then
   WriteToLog line & " responded to ping"
   WScript.Echo line & " responded to ping"

   On Error Resume Next

   Set usr = GetObject("WinNT://" & line & "/Administrator, user")
  usr.SetPassword newPass
  usr.SetInfo

  If Err.Number <> 0 Then
   WriteToLog "Error resetting password on " & line & ": " & Err.Description
   WScript.Echo "Error resetting password on " & line & ": " &
Err.Description
   Err.Clear
  Else
   WriteToLog "Password Reset on " & line
   WScript.Echo "Password Reset on " & line
  End If
Else
  WriteToLog line & " did not respond to ping"
  WScript.Echo line & " did not respond to ping"
End If
Wend

fil.Close

Sub WriteToLog(LogData)
On Error Resume Next

Dim fil
'8 = ForAppending
Set fil = fso.OpenTextFile(LogFile, 8, True)

fil.WriteLine(LogData)

fil.Close
Set fil = Nothing
End Sub

Set usr = Nothing
Set fil = Nothing
Set fso = Nothing
Set shl = Nothing



--
Cordialement,
Mathieu CHATEAU
English blog: http://lordoftheping.blogspot.com
French blog: http://www.lotp.fr


Show quote
"Miha" <miha.ber***@email.si> wrote in message
news:A779FF7B-23A9-4F84-8648-1B627A19AC5C@microsoft.com...
> Hi
>
> Is it possible and how to change local admin password on all Win2000/WinXP
> computer in domain?
> Can't find any function in GPO, the only way that I can think of is via
> script, but it's a problem that script is run with users privileges, and
> they are ordinary users not admins?
> Any ideas?
> Regards,
> Miha
>
Author
18 Oct 2007 9:39 AM
Miha
Thank you. Works like a charm!
Regards,Miha


Show quote
"Mathieu CHATEAU" <gollum***@free.fr> wrote in message
news:OEBjRWVEIHA.5980@TK2MSFTNGP04.phx.gbl...
> Hello,
>
> Here is a vbscript from the famous Brian Desmond.
> Fill a workstations.txt with workstations names and the newPass = ""
> If you don't know how to fill the text file, please let me know.
> If you administrator local name is not "Administrator", change it in the
> script (line WinNT://" & line & "/Administrator, user")
>
>
> '==========================================================================
> ' NAME: Change local administrator password on list of machines
> ' AUTHOR: Brian Desmond
> ' DATE  : 6/19/2006
> '==========================================================================
> Option Explicit
>
> ' What to change the password to
> Const newPass = ""
>
> Const LogFile = "AdminReset.log"
> Const inputFile = "workstations.txt"
>
> Dim fso
> Set fso = CreateObject("Scripting.FileSystemObject")
>
> Dim shl
> Set shl = WScript.CreateObject("WScript.Shell")
>
> Dim fil
> Set fil = fso.OpenTextFile(inputFile)
>
> WriteToLog "Beginning Pass of " & inputFile & " at " & Now()
> WScript.Echo "Beginning Pass of " & inputFile & " at " & Now()
> 'On Error Resume Next
>
> Dim usr
> Dim line
> Dim exec
> Dim pingResults
> While Not fil.AtEndOfStream
> line = fil.ReadLine
>
> Set exec = shl.Exec("ping -n 2 -w 1000 " & line)
>   pingResults = LCase(exec.StdOut.ReadAll)
>
>  If InStr(pingResults, "reply from") Then
>   WriteToLog line & " responded to ping"
>   WScript.Echo line & " responded to ping"
>
>   On Error Resume Next
>
>   Set usr = GetObject("WinNT://" & line & "/Administrator, user")
>  usr.SetPassword newPass
>  usr.SetInfo
>
>  If Err.Number <> 0 Then
>   WriteToLog "Error resetting password on " & line & ": " &
> Err.Description
>   WScript.Echo "Error resetting password on " & line & ": " &
> Err.Description
>   Err.Clear
>  Else
>   WriteToLog "Password Reset on " & line
>   WScript.Echo "Password Reset on " & line
>  End If
> Else
>  WriteToLog line & " did not respond to ping"
>  WScript.Echo line & " did not respond to ping"
> End If
> Wend
>
> fil.Close
>
> Sub WriteToLog(LogData)
> On Error Resume Next
>
> Dim fil
> '8 = ForAppending
> Set fil = fso.OpenTextFile(LogFile, 8, True)
>
> fil.WriteLine(LogData)
>
> fil.Close
> Set fil = Nothing
> End Sub
>
> Set usr = Nothing
> Set fil = Nothing
> Set fso = Nothing
> Set shl = Nothing
>
>
>
> --
> Cordialement,
> Mathieu CHATEAU
> English blog: http://lordoftheping.blogspot.com
> French blog: http://www.lotp.fr
>
>
> "Miha" <miha.ber***@email.si> wrote in message
> news:A779FF7B-23A9-4F84-8648-1B627A19AC5C@microsoft.com...
>> Hi
>>
>> Is it possible and how to change local admin password on all
>> Win2000/WinXP computer in domain?
>> Can't find any function in GPO, the only way that I can think of is via
>> script, but it's a problem that script is run with users privileges, and
>> they are ordinary users not admins?
>> Any ideas?
>> Regards,
>> Miha
>>
>
Author
18 Oct 2007 2:06 PM
Mathieu CHATEAU
great :)

--
Cordialement,
Mathieu CHATEAU
English blog: http://lordoftheping.blogspot.com
French blog: http://www.lotp.fr


Show quote
"Miha" <miha.ber***@email.si> wrote in message
news:9D7252C6-71CE-4598-90C0-C8851009E9A5@microsoft.com...
> Thank you. Works like a charm!
> Regards,Miha
>
>
> "Mathieu CHATEAU" <gollum***@free.fr> wrote in message
> news:OEBjRWVEIHA.5980@TK2MSFTNGP04.phx.gbl...
>> Hello,
>>
>> Here is a vbscript from the famous Brian Desmond.
>> Fill a workstations.txt with workstations names and the newPass = ""
>> If you don't know how to fill the text file, please let me know.
>> If you administrator local name is not "Administrator", change it in the
>> script (line WinNT://" & line & "/Administrator, user")
>>
>>
>> '==========================================================================
>> ' NAME: Change local administrator password on list of machines
>> ' AUTHOR: Brian Desmond
>> ' DATE  : 6/19/2006
>> '==========================================================================
>> Option Explicit
>>
>> ' What to change the password to
>> Const newPass = ""
>>
>> Const LogFile = "AdminReset.log"
>> Const inputFile = "workstations.txt"
>>
>> Dim fso
>> Set fso = CreateObject("Scripting.FileSystemObject")
>>
>> Dim shl
>> Set shl = WScript.CreateObject("WScript.Shell")
>>
>> Dim fil
>> Set fil = fso.OpenTextFile(inputFile)
>>
>> WriteToLog "Beginning Pass of " & inputFile & " at " & Now()
>> WScript.Echo "Beginning Pass of " & inputFile & " at " & Now()
>> 'On Error Resume Next
>>
>> Dim usr
>> Dim line
>> Dim exec
>> Dim pingResults
>> While Not fil.AtEndOfStream
>> line = fil.ReadLine
>>
>> Set exec = shl.Exec("ping -n 2 -w 1000 " & line)
>>   pingResults = LCase(exec.StdOut.ReadAll)
>>
>>  If InStr(pingResults, "reply from") Then
>>   WriteToLog line & " responded to ping"
>>   WScript.Echo line & " responded to ping"
>>
>>   On Error Resume Next
>>
>>   Set usr = GetObject("WinNT://" & line & "/Administrator, user")
>>  usr.SetPassword newPass
>>  usr.SetInfo
>>
>>  If Err.Number <> 0 Then
>>   WriteToLog "Error resetting password on " & line & ": " &
>> Err.Description
>>   WScript.Echo "Error resetting password on " & line & ": " &
>> Err.Description
>>   Err.Clear
>>  Else
>>   WriteToLog "Password Reset on " & line
>>   WScript.Echo "Password Reset on " & line
>>  End If
>> Else
>>  WriteToLog line & " did not respond to ping"
>>  WScript.Echo line & " did not respond to ping"
>> End If
>> Wend
>>
>> fil.Close
>>
>> Sub WriteToLog(LogData)
>> On Error Resume Next
>>
>> Dim fil
>> '8 = ForAppending
>> Set fil = fso.OpenTextFile(LogFile, 8, True)
>>
>> fil.WriteLine(LogData)
>>
>> fil.Close
>> Set fil = Nothing
>> End Sub
>>
>> Set usr = Nothing
>> Set fil = Nothing
>> Set fso = Nothing
>> Set shl = Nothing
>>
>>
>>
>> --
>> Cordialement,
>> Mathieu CHATEAU
>> English blog: http://lordoftheping.blogspot.com
>> French blog: http://www.lotp.fr
>>
>>
>> "Miha" <miha.ber***@email.si> wrote in message
>> news:A779FF7B-23A9-4F84-8648-1B627A19AC5C@microsoft.com...
>>> Hi
>>>
>>> Is it possible and how to change local admin password on all
>>> Win2000/WinXP computer in domain?
>>> Can't find any function in GPO, the only way that I can think of is via
>>> script, but it's a problem that script is run with users privileges, and
>>> they are ordinary users not admins?
>>> Any ideas?
>>> Regards,
>>> Miha
>>>
>>
>
Author
13 Nov 2007 2:11 PM
Mike
Could you please explain how to fill the workstations.txt file and structure?

Thanks, Mike

Show quote
"Mathieu CHATEAU" wrote:

> Hello,
>
> Here is a vbscript from the famous Brian Desmond.
> Fill a workstations.txt with workstations names and the newPass = ""
> If you don't know how to fill the text file, please let me know.
> If you administrator local name is not "Administrator", change it in the
> script (line WinNT://" & line & "/Administrator, user")
>
>
> '==========================================================================
> ' NAME: Change local administrator password on list of machines
> ' AUTHOR: Brian Desmond
> ' DATE  : 6/19/2006
> '==========================================================================
> Option Explicit
>
> ' What to change the password to
> Const newPass = ""
>
> Const LogFile = "AdminReset.log"
> Const inputFile = "workstations.txt"
>
> Dim fso
> Set fso = CreateObject("Scripting.FileSystemObject")
>
> Dim shl
> Set shl = WScript.CreateObject("WScript.Shell")
>
> Dim fil
> Set fil = fso.OpenTextFile(inputFile)
>
> WriteToLog "Beginning Pass of " & inputFile & " at " & Now()
> WScript.Echo "Beginning Pass of " & inputFile & " at " & Now()
> 'On Error Resume Next
>
> Dim usr
> Dim line
> Dim exec
> Dim pingResults
> While Not fil.AtEndOfStream
>  line = fil.ReadLine
>
>  Set exec = shl.Exec("ping -n 2 -w 1000 " & line)
>    pingResults = LCase(exec.StdOut.ReadAll)
>
>   If InStr(pingResults, "reply from") Then
>    WriteToLog line & " responded to ping"
>    WScript.Echo line & " responded to ping"
>
>    On Error Resume Next
>
>    Set usr = GetObject("WinNT://" & line & "/Administrator, user")
>   usr.SetPassword newPass
>   usr.SetInfo
>
>   If Err.Number <> 0 Then
>    WriteToLog "Error resetting password on " & line & ": " & Err.Description
>    WScript.Echo "Error resetting password on " & line & ": " &
> Err.Description
>    Err.Clear
>   Else
>    WriteToLog "Password Reset on " & line
>    WScript.Echo "Password Reset on " & line
>   End If
>  Else
>   WriteToLog line & " did not respond to ping"
>   WScript.Echo line & " did not respond to ping"
>  End If
> Wend
>
> fil.Close
>
> Sub WriteToLog(LogData)
>  On Error Resume Next
>
>  Dim fil
>  '8 = ForAppending
>  Set fil = fso.OpenTextFile(LogFile, 8, True)
>
>  fil.WriteLine(LogData)
>
>  fil.Close
>  Set fil = Nothing
> End Sub
>
> Set usr = Nothing
> Set fil = Nothing
> Set fso = Nothing
> Set shl = Nothing
>
>
>
> --
> Cordialement,
> Mathieu CHATEAU
> English blog: http://lordoftheping.blogspot.com
> French blog: http://www.lotp.fr
>
>
> "Miha" <miha.ber***@email.si> wrote in message
> news:A779FF7B-23A9-4F84-8648-1B627A19AC5C@microsoft.com...
> > Hi
> >
> > Is it possible and how to change local admin password on all Win2000/WinXP
> > computer in domain?
> > Can't find any function in GPO, the only way that I can think of is via
> > script, but it's a problem that script is run with users privileges, and
> > they are ordinary users not admins?
> > Any ideas?
> > Regards,
> > Miha
> >
>
>
Author
15 Nov 2007 7:07 AM
Miha
Mike, you just type your computers in a plain text file like in each line
(without any commas)

IT-MIKE
IT-JOHN
IT-JON
.....

Regards,Miha

Show quote
"Mike" <M***@discussions.microsoft.com> wrote in message
news:33750D0B-CAF5-47D8-970E-3948CE264A7E@microsoft.com...
> Could you please explain how to fill the workstations.txt file and
> structure?
>
> Thanks, Mike
>
> "Mathieu CHATEAU" wrote:
>
>> Hello,
>>
>> Here is a vbscript from the famous Brian Desmond.
>> Fill a workstations.txt with workstations names and the newPass = ""
>> If you don't know how to fill the text file, please let me know.
>> If you administrator local name is not "Administrator", change it in the
>> script (line WinNT://" & line & "/Administrator, user")
>>
>>
>> '==========================================================================
>> ' NAME: Change local administrator password on list of machines
>> ' AUTHOR: Brian Desmond
>> ' DATE  : 6/19/2006
>> '==========================================================================
>> Option Explicit
>>
>> ' What to change the password to
>> Const newPass = ""
>>
>> Const LogFile = "AdminReset.log"
>> Const inputFile = "workstations.txt"
>>
>> Dim fso
>> Set fso = CreateObject("Scripting.FileSystemObject")
>>
>> Dim shl
>> Set shl = WScript.CreateObject("WScript.Shell")
>>
>> Dim fil
>> Set fil = fso.OpenTextFile(inputFile)
>>
>> WriteToLog "Beginning Pass of " & inputFile & " at " & Now()
>> WScript.Echo "Beginning Pass of " & inputFile & " at " & Now()
>> 'On Error Resume Next
>>
>> Dim usr
>> Dim line
>> Dim exec
>> Dim pingResults
>> While Not fil.AtEndOfStream
>>  line = fil.ReadLine
>>
>>  Set exec = shl.Exec("ping -n 2 -w 1000 " & line)
>>    pingResults = LCase(exec.StdOut.ReadAll)
>>
>>   If InStr(pingResults, "reply from") Then
>>    WriteToLog line & " responded to ping"
>>    WScript.Echo line & " responded to ping"
>>
>>    On Error Resume Next
>>
>>    Set usr = GetObject("WinNT://" & line & "/Administrator, user")
>>   usr.SetPassword newPass
>>   usr.SetInfo
>>
>>   If Err.Number <> 0 Then
>>    WriteToLog "Error resetting password on " & line & ": " &
>> Err.Description
>>    WScript.Echo "Error resetting password on " & line & ": " &
>> Err.Description
>>    Err.Clear
>>   Else
>>    WriteToLog "Password Reset on " & line
>>    WScript.Echo "Password Reset on " & line
>>   End If
>>  Else
>>   WriteToLog line & " did not respond to ping"
>>   WScript.Echo line & " did not respond to ping"
>>  End If
>> Wend
>>
>> fil.Close
>>
>> Sub WriteToLog(LogData)
>>  On Error Resume Next
>>
>>  Dim fil
>>  '8 = ForAppending
>>  Set fil = fso.OpenTextFile(LogFile, 8, True)
>>
>>  fil.WriteLine(LogData)
>>
>>  fil.Close
>>  Set fil = Nothing
>> End Sub
>>
>> Set usr = Nothing
>> Set fil = Nothing
>> Set fso = Nothing
>> Set shl = Nothing
>>
>>
>>
>> --
>> Cordialement,
>> Mathieu CHATEAU
>> English blog: http://lordoftheping.blogspot.com
>> French blog: http://www.lotp.fr
>>
>>
>> "Miha" <miha.ber***@email.si> wrote in message
>> news:A779FF7B-23A9-4F84-8648-1B627A19AC5C@microsoft.com...
>> > Hi
>> >
>> > Is it possible and how to change local admin password on all
>> > Win2000/WinXP
>> > computer in domain?
>> > Can't find any function in GPO, the only way that I can think of is via
>> > script, but it's a problem that script is run with users privileges,
>> > and
>> > they are ordinary users not admins?
>> > Any ideas?
>> > Regards,
>> > Miha
>> >
>>
>>
Author
18 Oct 2007 7:54 AM
John
Miha wrote:
> Hi
>
> Is it possible and how to change local admin password on all
> Win2000/WinXP computer in domain?
> Can't find any function in GPO, the only way that I can think of is via
> script, but it's a problem that script is run with users privileges, and
> they are ordinary users not admins?
> Any ideas?
> Regards,
> Miha
>

Give this a try:
http://internetbusinessdaily.net/how-to-hack-a-window-xp-admins-password/
Author
18 Oct 2007 8:24 AM
Mathieu CHATEAU
Hello,

this is not what was asked, and this info is dumb moreover
--
Cordialement,
Mathieu CHATEAU
English blog: http://lordoftheping.blogspot.com
French blog: http://www.lotp.fr


Show quote
"John" <greenjungle2007-mo***@yahoo.com.au> wrote in message
news:eCcrawVEIHA.3636@TK2MSFTNGP03.phx.gbl...
> Miha wrote:
>> Hi
>>
>> Is it possible and how to change local admin password on all
>> Win2000/WinXP computer in domain?
>> Can't find any function in GPO, the only way that I can think of is via
>> script, but it's a problem that script is run with users privileges, and
>> they are ordinary users not admins?
>> Any ideas?
>> Regards,
>> Miha
>>
>
> Give this a try:
> http://internetbusinessdaily.net/how-to-hack-a-window-xp-admins-password/
Author
18 Oct 2007 9:57 AM
se2946
you can use RUNAS command and execute the script as domain admin.
Of course, you need to hide the domain admin password.
(usually, you should create a temporary domain admin account on AD and use
it.)

Show quote
"Miha" wrote:

> Hi
>
> Is it possible and how to change local admin password on all Win2000/WinXP
> computer in domain?
> Can't find any function in GPO, the only way that I can think of is via
> script, but it's a problem that script is run with users privileges, and
> they are ordinary users not admins?
> Any ideas?
> Regards,
> Miha
>

AddThis Social Bookmark Button