X
Tech

Change users' passwords from the command line

Most organizations recognize the importance of establishing a strict password policy that requires users to change their passwords on a regular basis. If you set a password policy that forces users to change their passwords every few weeks, the computer will prompt the user for a new password when he or she logs on once the designated time has expired.
Written by ZDNet Staff, Contributor
Most organizations recognize the importance of establishing a strict password policy that requires users to change their passwords on a regular basis. If you set a password policy that forces users to change their passwords every few weeks, the computer will prompt the user for a new password when he or she logs on once the designated time has expired.

Most users are familiar with the Windows NT Security dialog box that pops up when they press [Ctrl][Alt][Delete]. This dialog box includes the Change Password button, an easy way to make the change.

But these methods aren't the only ways to change passwords, and administrators have even more options. You can open User Manager, double-click the user account, and enter the new password in the Password text box.

You can also change passwords from the command line. At the command prompt, enter the following:

NET USER <username> <password> /domain

Replace <username> with the name of the account you want to change and <password> with the new password. You can use the /domain switch to specify that it's a domain account. If you're changing a local account, leave the switch out.

To get more information about a specific user account, enter NET USER <username>.

Editorial standards