You need to have admin access to perform this change from the command line. This is an especially handy trick if you want to change a password on an account but you’ve forgotten the original (going through the Control Panel can require confirmation of the old password).
In this example, I want to change the password for a user names Askstudent. To verify the user name, by simply typing net user, I get a list of all the user names on that windows machine. Now, go to the command prompt and enter:
> net user asks mypa$$word
If there are people near you and you don’t want them to see the password you type, enter:
net user *
E.g. > net user asks *
> Type a password for the user:
> Confirm the password: