Re: Resetting Machine's Local Password
From: Wayne Tilton (Wayne_Tilton_at_NoSpam.Yahoo.com)
Date: 09/03/04
- Next message: Tom Lavedas: "Re: compare file content"
- Previous message: Philippe Freddi: "Re: Trying to execute a dos command"
- In reply to: JP Martinez: "Resetting Machine's Local Password"
- Next in thread: Ross Presser: "Re: Resetting Machine's Local Password"
- Reply: Ross Presser: "Re: Resetting Machine's Local Password"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 03 Sep 2004 13:29:51 -0700
"JP Martinez" <pierre@perutek.com> wrote in
news:OKAaGQekEHA.2588@TK2MSFTNGP12.phx.gbl:
> Hi, I would like to be able to reset the administrator password in
> workstations and file servers. Is there a way or could someone point
> me to a sample on how to do this. Even if the passwords(new and old)
> are hardcoded in the code it is ok .
>
> I would like for this script to be able to go at some remote file
> servers and/or workstation and reset this
>
> Any help will be appreciated.
> -Pierre
>
>
>
How 'bout something like this:
On Error Resume Next
Set UserObj = GetObject("WinNT://WTILTONW1/TestUser")
UserObj.ChangePassword "blahblah", "bleablea"
UserObj.SetInfo
Set UserObj = Nothing
If err.number = 0 Then
WScript.Echo "Password Change Failed"
Else
WScript.Echo "Password Change Was Successful"
End if
Wayne
-- Standard Disclaimer: I said it, they didn't, so blame me, not them! Spam Avoidance: My reply address is invalid to confuse the spambots. You can reach me at 'Wayne_Tilton at yahoo dot com'
- Next message: Tom Lavedas: "Re: compare file content"
- Previous message: Philippe Freddi: "Re: Trying to execute a dos command"
- In reply to: JP Martinez: "Resetting Machine's Local Password"
- Next in thread: Ross Presser: "Re: Resetting Machine's Local Password"
- Reply: Ross Presser: "Re: Resetting Machine's Local Password"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|