Security

Build Your Skills: Change user passwords with Cusrmgr.exe

Explains how Cusrmge.exe enables command line functionality for larger user management tasks


You probably do most of your user management with either the Active Directory Users And Computers console (domain accounts) or the Local Users And Groups console (local accounts). These consoles will generally allow you to perform most of the tasks you need, but sometimes it’s handy to be able to manage users from a command prompt. For example, you might want to accomplish user management tasks in a batch file. Or, maybe you just want another option for remote user management. Whatever the case, you can use the Cusrmgr.exe tool included with the Windows 2000 Resource Kit to manage users, both locally and across the network.

Cusrmgr.exe provides many options to perform user management tasks. For example, you can rename or delete accounts. You can also rename local or global groups and add/remove users in those groups. You can also set several user account properties such as comment, full name, and user profile settings.

Changing a user's password with Cusrmgr.exe
One particularly good use for Cusrmgr.exe is changing an account’s password. You can specify a password for an account or use the -p switch to create a random password. Here’s an example that would set a random password for the administrator account on a computer named server1. (This naturally assumes there's at least one other account with administrator privileges on the server/domain that you can use for managing the server.)
Cusrmgr.exe -u administrator \\server1 -p -m

Here’s an example that would set the password for the account jboyce to framistat9:
Cusrmgr.exe -u jboyce \\server1 -P framistat9

Note that the first example uses a lowercase p, while the second example uses an uppercase P. These are actually two different switches. For more information on the switches available with Cusrmgr.exe, check out the Resource Kit documentation or execute cusrmgr /? at a command prompt.

Editor's Picks