2

Suppose there is a user account named testuser on a windows machine and it belongs to the Users group and the Users group only. The current password of testuser is known. The question is, how to change the password of testuser in a command line prompt (or powershell) on another windows machine in the same LAN? It would be even better if the old/new passwords can be provided in an interactive manner (i.e. can be hiddenly keyed in when asked, instead of explicitly provided as a command line argument).

Tools/Utilities I tried so far mainly provide the ability to remotely "reset" the password of a user account (requiring admin rights but not current password). What I really want is to "change" the password of a user account (requiring current password but not admin rights). The latter can be done in Windows GUI by "CTRL+ALT+DEL" (by providing "hostname\username" in the user name field). I'm just searching for an equivalent approach in command line prompt.

closed as off-topic by mdpc, Tom O'Connor Dec 3 '14 at 9:51

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions must be relevant to professional system administration. Server Fault is dedicated to professional system and network administrators. End user and enthusiast questions are off-topic (contact your system administrator or hire a professional to help you out). Please see the Help Center for more information." – mdpc, Tom O'Connor
If this question can be reworded to fit the rules in the help center, please edit the question.

  • Is this a stand alone machine, or an Active Directory domain? – Davidw Dec 3 '14 at 1:57
  • @Davidw It's a standalone machine. There is no AD domain. – goodbyeera Dec 3 '14 at 2:04
  • 3
    As mentioned by @yagmoth555 in an answer below, the official MS method is the net user command (which can be sent to a remote computer. It does, however, require administrative rights, and I don't know if there is a way to invoke a password change from a command line. It might be helpful if you'd mention what you're really trying to achieve, as there might be an easier or different approach. – HopelessN00b Dec 3 '14 at 2:33
0

Hi please check that KB https://support.microsoft.com/KB/149427

You can issue a net user username new_password or net user username * to be prompted the password

Only an admin can issue it or of course under the useraccount. A user GPO could be a good way to send the remote script.

If you can't send the GPO, as in a workgroup in example. Please just make a .bat with the net user username * in it, and copy it on the startup menu for that user remotly or remotly manage the computer and copy it as a local user login script in the local GPO policy.

  • The question is how to do that remotely, apparently in a non-AD environment. – Sven Dec 3 '14 at 1:57
  • @Sven ok, correcting my answer :) – yagmoth555 Dec 3 '14 at 2:01
  • Sorry, but this is just nonsense. – Sven Dec 3 '14 at 2:13
  • @Sven Oh well, gonna erase the answer then. but the OP want to initiate a password change remotly, so I assume a user got to be in front of the keyboard. The good way to do it is by forcing it in AD or in the local user group, but he want it scripted. – yagmoth555 Dec 3 '14 at 2:14
  • 1
    @HopelessN00b net user username * ask interactively for the password... If the OP create a script, on the user desktop with that, or pushed in any mean (startup script, local gpo, etc..) the command prompt will open and ask the username the password as it's executed in the user login, I told that way as the OP wanted to force the prompt, or it can be a simple .cmd in the desktop for the user to decide. – yagmoth555 Dec 3 '14 at 2:37

Not the answer you're looking for? Browse other questions tagged or ask your own question.