question

sunshine-7932 avatar image
4 Votes"
sunshine-7932 asked JulienG-7695 commented

PsExec: Logon failure: the user has not been granted the requested logon type at this computer.

Hello,

I am trying to run the following command within a domain using an account with Domain Admin on to computers within the domain:

psexec64 @pcs.txt -u domain\adminaccount "\\server\share\file.cmd"

I enter the password when prompted and PsExec attempts to connect to the hostnames in my .txt but it just returns:

PsExec could not start \\server\share\file.cmd on COMPUTERNAME
Logon failure: the user has not been granted the requested logon type at this computer.

I would appreciate your assistance.
Thank you.







windows-sysinternals-pstools
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

mariora avatar image
2 Votes"
mariora answered MikeDiack-1747 commented

PSEXEC tries to connect to the Admin$ share of the remote computer, in order to copy on the remote machine the PSEXecSVC.exe, which is the binary of the Service that will run remotely.

If using a domain admin account you are not able to perform a network type logon like this one on the remote machine it is probably because the Admin$ share has been disable via a policy/registry key.

Try by yourself running a cmd as that Domain Admin user and then from that CMD issuing a net use \\ComputerName\Admin$. You should get the same error.

HTH
-mario

· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

It's more likely that sunshine... is running psexec version 2.32 - the current version which has broken the remote control side of psexec. The previous version 2.20 works fine. Please add your voice asking that this be fixed ASAP - it's a major regression.

4 Votes 4 ·

Hi Mario,

Thanks for your answer.

From the domain admin account I am able to access \\remotecomputer\admin$ and also net use \\ComputerName\Admin$ is successful.

I am still unsure why the PsExec cmd fails with that error.

2 Votes 2 ·

It's more likely that sunshine... is running psexec version 2.32 - the current version which has broken the remote control side of psexec. The previous version 2.20 works fine. Please add your voice asking that this be fixed ASAP - it's a major regression.

2 Votes 2 ·
MikeDiack-1747 avatar image
4 Votes"
MikeDiack-1747 answered

Its due to a bug in psexec 2.32 (the current version). I've raised this already, but please add your voice to it. The previous version (2.20) works fine.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

foxmsft avatar image
6 Votes"
foxmsft answered JulienG-7695 commented

The solution for 2.30+ is to add the -i flag for interactive session.

· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

It worked like a charm.

0 Votes 0 ·

psexec -i works, thanks

0 Votes 0 ·