No announcement yet.

Net User command (reset local admin password)

  • Filter
  • Time
  • Show
Clear All
new posts

  • Net User command (reset local admin password)


    I was wonder if the command 'net user' was able to reset local admin password remotely.

    I wrote a batch file to read a file that has a list of all the pc that requires local admin password to be change

    below is the code for resetlocaladmin.bat

    set pc_name=computers.txt

    for /f %%a in (%pc_name%) do call c:\netuser.bat

    net user administrator Password

    i found
    '' but as I still have windows 2000 and a few NT machines this doesnt really help me out

    So if anyone that has a similar situation and can shed some lights would be great help.


  • #2
    Re: Net User command (reset local admin password)

    Hi Huy,

    Yes, you can use net user administrator Password

    The first script and the batch in the thread you refering to were designed to reset and rename the local administrator account, w/out to know the current given name of the local administrtor account.

    In your case, you know apparently that the name of the adminstratoraccount still is Administrator, you only want to change the password. So then you can use "net user ...". But you have to run it as an local administrator or (like the other scripts) make it a computer start-up script instead of an user logonscript, thatway it will be runned as the systemaccount and you don't have to use 2nd-logon credentials with the old password to reset the password.
    And also.. becareful with adding the new password in the script, because the share where the script is stored is readable for every user. There for use a 'parameter' (%1) in the script, so you and write the password in the GPO, that is more secure.

    If you want to do change all the local password 'remotely' as a member of the 'domain admins' group (like what you try to do with your batch) then search for..and download cusrmgr.exe
    more about that tool:

    Or, you can use one command-line with PsPasswd.exe
    more about that tool:


    I added some more links in the other thread
    Last edited by Rems; 9th April 2007, 21:58.

    This posting is provided "AS IS" with no warranties, and confers no rights.


    ** Remember to give credit where credit's due **
    and leave Reputation Points for meaningful posts