Re: Automated Password Changes

From: Rick Kingslan [MVP 2000/NT] (rkingsla.cox.net@127.0.0.1)
Date: 10/18/02


From: "Rick Kingslan [MVP 2000/NT]" <rkingsla.cox.net@127.0.0.1>
Date: Thu, 17 Oct 2002 17:01:48 -0500


If you're in a Win2k Domain, you can use Group Policy and the scripts that
run when the machine starts up (Startup script) to accomplish just this.

Edit the GP in the computer section and under the Scripts section you will
find Startup script. In the parameters, type:

%COMPUTERNAME% <Password goes in here>

Cut the script below and pull it into the GP in the Startup script. Restart
the machine, voila! Local Administrator password reset to your new
password.

Oh, and unless a user has the ability to edit GP, they can't get to the
password. Because the script exists in the SYSVOL, the might be able to get
to that, but the password isn't in the script.

Enjoy!

--
Rick Kingslan  MCSE, MCSA, MCT
Microsoft MVP - Windows 2000/NT
Beta ID #108394
'===========================================
Option Explicit
dim NewName, computername, username, SComputer, objArgs, SOldname, SNewName,
SPassword
dim Wshshell, Control
'on error resume next
Set objArgs = WScript.Arguments
Set Wshshell = Wscript.CreateObject("Wscript.shell")
If objArgs.Count < 2 Then
WScript.Echo "Usage: admin.vbs servername Password"
WScript.Echo "admin.vbs cpoctsva01 Passw0rd!"
WScript.Echo "Resets local admin pwd"
WScript.Echo " "
Else
 SComputer = objArgs(0)
 SPassword = objArgs(1)
End If
Set computername = GetObject("WinNT://" & SComputer & ",computer")
Set username = computername.GetObject("user", "Administrator")
Username.SetPassword SPassword
UserName.SetInfo()
'================================================
"Techboy" <techboy@thomasville.org> wrote in message
news:60e001c27618$1a1fcea0$3aef2ecf@TKMSFTNGXA09...
> We have a Windows 2000 network and we want to change the
> local administrator password for all of our pcs in our
> LAN.  Is there a way that we can automate this task so we
> don't have to go to each pc and change it?  The Admin
> password will be the same on all pcs.  Any help would be
> greatly appreciated.  Thanks
>
> Techboy


Relevant Pages

  • Re: startup script
    ... available sooner in the computer startup than %Computername% might be. ... I had confirmed this script work by manual run in client workstation. ... This startup script placed in domain controller folder e.g. ... make sure "Authenticated Users" have sufficient access to the ...
    (microsoft.public.windows.group_policy)
  • Re: Xcopy not working in startup script
    ... This is a basic batch file script that I am ... deploying through group policy in the startup script to copy ... it works fine on it's own, but when deployed through group policy it ... the permissions of the computer object elsewhere in the domain. ...
    (microsoft.public.windows.server.general)
  • Re: Ooooopppps. Rights not right...
    ... Use a log in script to call a compiled file stored on a share. ... > because the classid is for per machine instead of per user. ... > you have create two user classes, one is called student; ... > Put this bat file to the computer startup script in the local group policy. ...
    (microsoft.public.windows.server.general)
  • Re: Power Management GPO?
    ... I suspect that the power management subsystem might not be started when the startup scripts runs or the SYSTEM context can't modify it, but I have some ideas about this and will do some testing later on today to work it out. ... I created a GPO and put the batch file in first as a startup script and when that didn't work I tried it as a logon script. ... A normal user can't change the power settings so a logon script like this won't work either. ... I can't remember if all power setting are per machine, but if some are per machine and some are per user then you could split it up into 2 scripts, one startup script and one logon script. ...
    (microsoft.public.windows.group_policy)
  • Re: Xcopy not working in startup script
    ... This is a basic batch file script that I am ... deploying through group policy in the startup script to copy ... I'm deploying it during the ... the permissions of the computer object elsewhere in the domain. ...
    (microsoft.public.windows.server.general)