Windows IT Pro is the authoritative and independent resource for windows nt, windows 2000, windows 2003, windows xp. Features a collection of resources and magazines for windows IT professionals.
  
  
  Advanced Search 


May 2002

The Cmdhere and Cusrmgr Tools


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

A command-prompt time-saver and a routine to randomize a password

This month, I have two useful Windows 2000 tools for you. The first, cmdhere.inf, modifies Windows Explorer so that you can right-click any folder and choose CMD Prompt Here. A command-prompt window then appears, and the default directory is already set to the folder that you right-clicked.

Why is Cmdhere useful? Because long pathnames make directory navigation a pain. For example, suppose you want to run a command-line utility from the Microsoft Windows 2000 Server Resource Kit. You need to open a command prompt, then type a command and path such as

cd "c:\program filesresource kit"

As if that process weren't inconvenient enough, you're probably already looking at C:\program files\resource kit in Windows Explorer, yet Windows Explorer still makes you do all that typing. If you install cmdhere.inf, you can simply right-click the resource kit folder and choose CMD Prompt Here.

To install cmdhere.inf, just right-click the file in Windows Explorer, then choose Install. Cmdhere.inf isn't perfect—you must right-click the actual folder icon; you can't just right-click the empty background inside a folder—but it's useful.

I found cusrmgr.exe when one of my clients was having trouble getting network administrators to be accountable for their actions. Six people in the client's firm do all network-related administration, and everyone who needs to do administration-related tasks is a member of Domain Admins (that's not the greatest strategy, but the client likes it). Several administrators are in the habit of using the default Administrator account to log on and do their work. That troubled the folks in charge because they wanted to be able to track what people did, but when several people use the Administrator account, not much tracking is possible.

I suggested randomizing the Administrator password, establishing a policy that no one is to change the password, and auditing password changes. Then, if an administrator changes the Administrator password, that action will show up in the log and the administrator can be reprimanded, banished, or whatever. Occasionally, you need to use the Administrator account, of course, but for those occasions, human resources (HR) can simply work out a procedure for approving its use.

Cusrmgr.exe is a file from the resource kit directory that lets you randomize a password. The tool's syntax is

cusrmgr -u <username>
 -p -m <machinename>

where username is the user account name and machinename is the name of the machine that holds the user account. (If the user account is a domain account, use the machine name of a domain controller—DC.) Specifying -p makes the password random.

Suppose I'm at a workstation in a domain named MYDOMAIN and I want to randomize the domain's Administrator password. Assuming that MYDOMAIN has a DC named DC4, I would type

cusrmgr -u Administrator -p -m \\DC4

Be sure the p is lowercase. A command with a capital P, such as

cusrmgr -u Administrator -P bigsecret -m \\DC4

sets a particular password—in this case, the command sets the Administrator account's password to bigsecret. For an explanation of how to use Cusrmgr in a batch file to change the password on multiple computers, see Sean Daily, Daily Answers, April 2002, InstantDoc ID 24210.

   Previous  [1]  2  Next 


Top Viewed ArticlesView all articles
CES 2009: Ballmer Announces Windows 7, Windows Live, Live Search Milestones

During his first-ever Consumer Electronics Show (CES) 2009 keynote address last night in Las Vegas, Microsoft CEO Steve Ballmer announced the pending public availability of a feature-complete Windows 7, the final version of Windows Live Essentials, and ...

Command Prompt Tricks

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

Where is Microsoft NetMeeting in Windows XP?

...


Windows OSs Whitepapers Why SaaS is the Right Solution for Log Management

Related Events Virtualization Forum: Optimizing Storage, Networks, Desktops, and Security

Cloud Computing Forum: Integrating Software, Server and Storage as a Service into Your Enterprise IT Delivery Model

Virtualization Forum: Optimizing Storage, Networks, Desktops, and Security

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 Become a VIP member of the Windows IT Pro community!
Get it all with the VIP CD and VIP access. A $500+ value for only $279!

Subscribe to Windows IT Pro!
Solve your toughest technical problems with our experts and access 10,000 + articles online. 30% off

Monthly Online Pass - Only $5.95!
Get instant access to 10,000+ articles from Windows IT Pro Magazine!

TechNet Virtual Labs
Evaluate and test Microsoft's newest products.


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 Windows Dev Pro IT Job Hound ITTV
IT Library Technology Resource Directory Connected Home Windows Excavator Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 Copyright © 2009 Penton Media, Inc., All rights reserved. Terms and Use | Privacy Statement | Reprints and Licensing