Jump to content

Change local admin password


Recommended Posts

Posted

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

  • Replies 9
  • Created
  • Last Reply
Guest Mathieu CHATEAU
Posted

Re: Change local admin password

 

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.bernik@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

>

Posted

Re: Change local admin password

 

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/

Guest Mathieu CHATEAU
Posted

Re: Change local admin password

 

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

 

 

"John" <greenjungle2007-moron@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/

Guest Special Access
Posted

Re: Change local admin password

 

On Thu, 18 Oct 2007 09:04:31 +0200, "Miha" <miha.bernik@email.si>

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

 

Hyena, from http://www.systemtools.com, can change the password for the local

admin on every computer in the domain. 30 day free trial, fully

functional. Licensing per admin, not per computer. And no, I'm not

associated with the program. I used it in a former life and was VERY

happy with the results.

 

Mike

Posted

Re: Change local admin password

 

Thank you. Works like a charm!

Regards,Miha

 

 

"Mathieu CHATEAU" <gollum123@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.bernik@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

>>

>

Posted

RE: Change local admin password

 

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.)

 

"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

>

Guest Mathieu CHATEAU
Posted

Re: Change local admin password

 

great :)

 

--

Cordialement,

Mathieu CHATEAU

English blog: http://lordoftheping.blogspot.com

French blog: http://www.lotp.fr

 

 

"Miha" <miha.bernik@email.si> wrote in message

news:9D7252C6-71CE-4598-90C0-C8851009E9A5@microsoft.com...

> Thank you. Works like a charm!

> Regards,Miha

>

>

> "Mathieu CHATEAU" <gollum123@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.bernik@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

>>>

>>

>

  • 4 weeks later...
Posted

Re: Change local admin password

 

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.bernik@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

> >

>

>

Posted

Re: Change local admin password

 

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

 

"Mike" <Mike@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.bernik@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

>> >

>>

>>


×
×
  • Create New...