Link to home
Start Free TrialLog in
Avatar of jetskimd
jetskimd

asked on

Need script to change Local Admin password on all workstations - Logon Script?

I am looking for a script to push out from my Active Directory to all workstations that will change the Local Administrator password on the machines.  I am in the process of locking down about 300 workstations and need to get this changed ASAP since some users are causing havoc.

Anyone know where I could find a tool that would do the trick?  Possibly something I could push out as a logon script?

Thanks!
Avatar of SamuraiCrow
SamuraiCrow

Here is some good info on using cusrmgr.exe to accomplish this task

http://www.winnetmag.com/Windows/Article/ArticleID/24210/24210.html
Here's a one-liner batch script you can set as a start-up script in the Machine policy:

net user administrator password

I rename my local administrator accounts as an extra security measure.  Here's another script to use if you want to use another admin account:

net user admin2 password
if %ERRORLEVEL% == 2 goto CREATE
goto end

:CREATE
net user admin2 /add password
net localgroup administrators /add admin2
goto END

:END
exit
Avatar of oBdA
Do you have the W2k Resource Kit (namely local.exe, getsid.exe, and cusrmgr.exe; note that cusrmgr.exe is not part of the free downloadable W2k3 ResKit)? I have a script here that remotely renames on a list machines the built-in account (even if renamed to an unknown name), changes the password, and lists other users with administrative permissions; this requires the tools above, though.
ASKER CERTIFIED SOLUTION
Avatar of Pete Long
Pete Long
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ThanQ
Another solution is to download the freeware Quest central from quest.com, under the AD portion of the mamnagement tools you can select computers and invoke the Change Local Administrator password wizard.
If you want to make it even go to this url:
http://www.systemtools.com/hyena/download_frame.htm

Download and install HYENA network tools. This is what I use to change hundred of workstations local password in minutes. No scripts just an easy to use GUI. If you like it and need a quick how to I will help you. Good luck
ooops... Sorrry I meant make it easier go to this url... I am an newbie as you can tell.
Sanchito,
How would you use to Hyena to change the passwords on muliple workstations?
open up Hyena-->Open up enterprise---> Right click all computers--->Click view all computers--> On the left side select the computer types and choose windows nt and windows 95. On the rights side where is says function  choose workstation and click ok.

Hyena will then enumerate a list of all workstations in your AD/NT domain. Once the list is completed all the computers(workstations) will appear on the right side. Select all computers using CTRL A and then right click on any one of the computers.

Select more functions and choose set account password and choose the password you want. This will change the password for all workstations.
GOOD LUCK!