PC Review


Reply
Thread Tools Rate Thread

Change local admin password

 
 
Miha
Guest
Posts: n/a
 
      18th Oct 2007
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

 
Reply With Quote
 
 
 
 
Mathieu CHATEAU
Guest
Posts: n/a
 
      18th Oct 2007
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" <(E-Mail Removed)> wrote in message
news:A779FF7B-23A9-4F84-8648-(E-Mail Removed)...
> 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
>


 
Reply With Quote
 
John
Guest
Posts: n/a
 
      18th Oct 2007
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...mins-password/
 
Reply With Quote
 
Mathieu CHATEAU
Guest
Posts: n/a
 
      18th Oct 2007
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-(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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...mins-password/


 
Reply With Quote
 
Miha
Guest
Posts: n/a
 
      18th Oct 2007
Thank you. Works like a charm!
Regards,Miha


"Mathieu CHATEAU" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message
> news:A779FF7B-23A9-4F84-8648-(E-Mail Removed)...
>> 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
>>

>


 
Reply With Quote
 
=?Utf-8?B?c2UyOTQ2?=
Guest
Posts: n/a
 
      18th Oct 2007
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
>

 
Reply With Quote
 
Mathieu CHATEAU
Guest
Posts: n/a
 
      18th Oct 2007
great

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


"Miha" <(E-Mail Removed)> wrote in message
news:9D7252C6-71CE-4598-90C0-(E-Mail Removed)...
> Thank you. Works like a charm!
> Regards,Miha
>
>
> "Mathieu CHATEAU" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> 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" <(E-Mail Removed)> wrote in message
>> news:A779FF7B-23A9-4F84-8648-(E-Mail Removed)...
>>> 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
>>>

>>

>


 
Reply With Quote
 
=?Utf-8?B?TWlrZQ==?=
Guest
Posts: n/a
 
      13th Nov 2007
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" <(E-Mail Removed)> wrote in message
> news:A779FF7B-23A9-4F84-8648-(E-Mail Removed)...
> > 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
> >

>
>

 
Reply With Quote
 
Miha
Guest
Posts: n/a
 
      15th Nov 2007
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" <(E-Mail Removed)> wrote in message
news:33750D0B-CAF5-47D8-970E-(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message
>> news:A779FF7B-23A9-4F84-8648-(E-Mail Removed)...
>> > 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
>> >

>>
>>


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I change the local admin password on 100's of PC's? Cyborg Windows XP General 5 24th Oct 2007 04:18 PM
change local admin password Tiffany Windows XP Security 1 9th Jun 2005 07:33 PM
Cant change local admin password Jagan Windows XP Security 0 16th Aug 2004 12:26 PM
Change local admin password? Long Voong Microsoft Windows 2000 Group Policy 1 21st Jan 2004 03:00 AM
Local Admin Password change through GPO Microsoft Windows 2000 Group Policy 7 9th Dec 2003 11:47 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:27 AM.