none
Run as administrator command without plain text password RRS feed

  • Question

  • Hello Everyone,

        I would like to run "psexec.exe" or "runas.exe" without entering password in command line.

        Meaning is to call password via text file or redirect the password like what

    psexec -u .\administrator calc.exe -accepteula -nobanner < password.txt

    runas.exe /user:.\Administrator calc < password.txt

       It fail. When I try, 

    ***psexec -u .\administrator -p xxxx calc.exe -accepteula -nobanner

    ***runas.exe /user:.\administrator xxxx calc.exe 

        It success.

        How can I type psexec.exe or runas.exe without entering password in one line command like *** ?

    Wednesday, July 31, 2019 7:41 AM

All replies

  • To run with /savecred, user have to type administrator password manual way for first time and I don't want to share administrator password with all users.

    That's why bro! 

    Thanks

    Friday, August 2, 2019 3:45 AM
  • What is the exact scope of this script?

    because you can run the command remotely without the need to share the password with the users..

    I mean, you you simply want to put an administrative app on the interactive desktop of the users, you can run from a server something like this:

    PSEXEC \\computername -i -u <username> -p <Password> -h calc.exe

    -i = interactrve

    -u = username of type Administrators for the machine as only administrators can run something on the interactive desktop

    -p = password for the admin

    -h = execute the application with the highest permission, that is as administrator

    Otherwise, if you want to put something on the local pc of the users, you need to create a loader application which get the password from a remote location or from a local storage protected with DPAPI and then run the app with those credential.

    HTH
    -mario

    Friday, August 2, 2019 8:25 AM
  • In the case,

    There is a script for user after login, user will run an app with admin privilege (admin credential) by this script.

    In the script, thers is "psexec -u admin -p xxxx clac.exe" like what, user call an app with admin credential.

    When I wireshark between user pcs and admin server, there is a plain text traffic with "psexec -u admin -p xxxx calc.exe" . so I want to encrypt the traffic or don't want the password along with the command.

    Thanks

    Monday, August 5, 2019 2:31 AM
  • What version of PsExec are you using??
    The latest is 2.2 and starting from 2.1 the password is encrypted over the network..

    Please, download the latest version and try again.. 

    HTH
    -mario

    Monday, August 5, 2019 7:06 AM