I need to change the local Administrator password on 50 computers within my domain. Can I automate this process?
Virtually all comprehensive enterprise network-administration tools can accomplish this task. If you want a small tool that performs only this function, consider a program such as Foghorn Security's Local Account Password Manager (LAPM). For details, visit http://www.foghornsecurity.com/lapm.
For a do-it-yourself solution, you can use the Microsoft Windows 2000 Server Resource Kit's Cusrmgr utility to remotely change the propertiesincluding the passwordof a Win2K or Windows NT 4.0 domain user account. To process account changes on multiple servers or workstations, you can use cusrmgr.exe from within a batch (i.e., .cmd or .bat) file. For example, to change the local Administrator password to mypass on the computers ws1 and ws2, you can run a batch file that includes the following commands:
This example assumes that the Administrator account is still set to the default of Administrator and that you have administrative privileges on both systems. Also, the -P switch is case sensitive (the lowercase -p switch sets the account password to a random string).
You can use a slightly modified version of this batch file to rename the Administrator account and change its password simultaneously. For example, to rename the account to BigKahuna and change the password to mypass, run a batch file including the following commands:
To accomplish your task, generate a list of the domain computers on which you want to change the local Administrator password, then save the results into a file. (You can use a utility such as Netdomnetdom.exe, available with the Win2K Support Tools or in the Microsoft Windows NT Server 4.0 Resource Kitand a tiny bit of scripting to carry out this step. See http://www.jsiinc.com/subg/tip3400/rh3459.htm for an example of a batch file that uses Netdom to perform a similar task, or see Darren Mar-Elia, "10 Resource Kit Remote Administration Tools," April 2001, InstantDoc ID 20046, for more information about the tool.) Then, create a batch file that uses cusrmgr.exe to change the local Administrator account password for each computer in the list.
Reader Comments
Does this work on Windows XP Pro?
John Tolmachoff -April 04, 2002
I have created the batch file and it does run, however the local admin password does not change.
What am I doing wrong? Help is needed.
Thank you.
Barry -April 08, 2002
Sean Daily's Tricks & Traps: "Daily Answers" (April 2002, InstantDoc ID 24210) describes a way to use the Microsoft Windows 2000 Server Resource Kit's Cusmgr utility to change local Administrator passwords in bulk. Here's what I suggest: Create a batch file similar to the one the author describes in the article, but run the batch file as a domain group policy under the computer configuration startup scripts. This solution doesn't require a list of machine names.
Scott Kohl -May 08, 2002
Hi,
I have try cusrmgr to change local administrator password in my server but no success if I use one or two @ in password.
Help is needed. Thank you.
DA COSTA Johnny -October 18, 2002
I have a question, is there a way of getting the results of this to pip to a text file so you know which machines it may have run on and which ones it didn't? It's too much to think that it would succeed on all machines, first time and it would be good to have the results of exactly what failed.
Becky -September 09, 2003
How I run a .exe as administrator on client? One link, .bat or vb6 code?
Marcelo -October 26, 2003
This was MOST EXCELLENT! Thanks for giving me the info I needed so I DIDNT have to change PWs on about 400 machines.
Thanks!
Sean Sink -March 16, 2004
I found a nice utility that automates this process, "Batch User Manager" from a company called ZenSoft:
http://www.zensoft.com/utilities_system_bum.html
It's a simple point-and-click solution. It creates a log file of all the changes, too, for auditing purposes.
Todd Harris -June 09, 2004
this doesnot work in my pc it gives the error named "'cusrmgr.exe' is not recognized as an internal or external command,
operable program or batch file."
Anonymous User -January 19, 2005
cusrmgr.exe is part of the Windows 2000 Server Resource Kit
Anonymous User -March 07, 2005
What everyone, including the author, failed to mention is a very important prerequisite: File and Printer Sharing must be installed and enabled on the computers where you want to change the passwords. I install File and Printer Sharing on every PC in my domain, BUT only enable it on those that actually have something to share. So this command (cusrmgr) doesn't really help so much.
Unfortunately, many tools and utilities require this, and many articles here and at the MSKB and elsewhere just assume that if you have a domain then you must have F&PS enabled. That's just not the case. (I mean, why should I have all those ADMIN$ and C$ shares out there for people to hack at?) The frustrating thing is that they don't even bother to mention that you have to have F&PS enabled.
I know this comment is coming 3 years after the original article. I'm just so frustrated with finding new tools that can do great things, but then don't work. Then I have to spend my time researching and experimenting only to learn that either F&PS has to be enabled, or services x, y, and z have to be running. It would just really be nice if everyone in IT (including Microsoft) would clearly state a tool's prerequisites up front without making any assumptions.
Sorry for venting.. I feel better now.
michael104 -March 23, 2005
I heartily second Micheals comments above. Along the same lines, I can't tell you how many times I've nearly blown a fuse after learning that a software package or utility requires NetBIOS to function properly. SIX FREAKIN' YEARS after it was supposedly made unnecessary with the release of Windows 2000. I believe the active directory migration tool falls into this category.
Free CDs Offer Fundamental Content for IT Pros Are you up to speed on the latest technologies and solutions? Don't miss out on your chance to get up to speed quickly on fundamental, in-depth information on some of the hottest topics in our library of content.
Let Your Users Reset Their Own Passwords: Free Download Try a 30 day free trial of Desktop Authority Password Self-Service – it provides an easy-to-use, robust system for allowing users to reset their own forgotten passwords or locked accounts.
Get Windows IT Pro & Mark Minasi’s Favorite Power Tools Guide Order Windows IT Pro now and get "More of Mark Minasi's Favorite Power Tools"--a in-depth guide to the most useful Windows commands --FREE with your paid order! Subscribe today, and save 58% off the cover price!
Deep Dive into VMware vSphere, eLearning Series Join John Savill to explore the major functionality capabilities of the vSphere virtualization platform, including identification of the changes from ESX 3.5.