Windows IT Pro is the leading independent community for IT professionals deploying Microsoft Windows server and client applications and technologies.
  
  
  Advanced Search 


April 2002

Using Cusrmgr to Change Local Administrator Passwords


RSS
Subscribe to Windows IT Pro | See More Resource Kit Articles Here | Reprints | Or get the Monthly Online Pass—only $5.95 a month!

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 properties—including the password—of 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:

cusrmgr.exe -u administrator -m \\WS1 -P mypass
cusrmgr.exe -u administrator -m \\WS2 -P mypass

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:

cusrmgr.exe -u Administrator -m \\WS1 -r BigKahuna -P mypass
cusrmgr.exe -u Administrator -m \\WS2 -r BigKahuna -P mypass

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 Netdom—netdom.exe, available with the Win2K Support Tools or in the Microsoft Windows NT Server 4.0 Resource Kit—and 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.

End of Article



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 (Article Rating: )


 See More Comments  1   2 

You must be a registered user or online subscriber to comment on this article. Please log on before posting a comment. Are you a new visitor? Register now




Top Viewed ArticlesView all articles
Command Prompt Tricks

One reader shares his tip for setting up the command prompt to reflect a remote path. ...

2009 Windows IT Pro Editors' Best and Community Choice Awards

Picking a favorite product from an impressive crowd of competitive offerings is never an easy task, and such was the case with our Editors' Best and Community Choice awards this year. ...

WinInfo Short Takes: Week of November 23, 2009

An often irreverent look at some of the week's other news, including some post-PDC some soul searching, a Google Chrome OS announcement and a Microsoft response, Windows 7 off to a supposedly strong start, the Jonas Brothers and Xbox 360, and so much more ...


Related Events Deep Dive into Windows Server 2008 R2 presented by John Savill

Cutting Costs with Client Management

7 Ways To Get More From Your SharePoint Deployment Now

Check out our list of Free Email Newsletters!

Windows OSs eBooks Understanding and Leveraging Code Signing Technologies

A Guide to Windows Certification and Public Keys

SQL Server Administration for Oracle DBAs

Related Windows OSs Resources Introducing Left-Brain.com, the online IT bookstore
Looking for books, CDs, toolkits, eBooks? Prime your mind at Left-Brain.com

Discover Windows IT Pro eLearning Series!
Clear & detailed technical information and helpful how-to's, all in our trademark no-nonsense format


Windows IT Pro Home Register FAQ for Windows WinInfo News
Europe Edition About Us Contact Us/Customer Service Media Kit Affiliates / Licensing  
SQL Server Magazine Office & SharePoint Pro DevProConnections IT Job Hound
Left-Brain.com Technology Resource Directory asp.netPRO ITTV Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 © 2009 Penton Media, Inc. Terms of Use | Privacy Statement