1

I am working on PsExec but i get error as "Access Denied " Firewall is disabled on both machine. Ports are also open at both machine.

C:\PSTOOLS>PsExec \\192.168.1.232 -u Administrator "c:\test\sample.bat Shailesh"

PsExec v1.98 - Execute processes remotely
Copyright (C) 2001-2010 Mark Russinovich
Sysinternals - www.sysinternals.com

Password:

Couldn't access 192.168.1.232:
Access is denied.
john
  • 1,995
  • 2
  • 17
  • 30
Shailesh Sutar
  • 1,517
  • 5
  • 23
  • 41
  • Did you omit the second \ in \\192.168.1.232 in the command line too? the command should be `psexec \\192.168.1.232 -u administrator "c:\test\sample.bat Shailesh"` – john Aug 05 '13 at 07:24
  • Also, when you say the firewall is disabled, do you mean "the service is disabled" or "the firewall is passing all traffic"? – john Aug 05 '13 at 07:26
  • Firewall service is disabled. Also have given command as psexec \\192.168.1.232 -u administrator "c:\test\sample.bat Shailesh" but its not working. – Shailesh Sutar Aug 05 '13 at 07:32
  • Disabling the firewall service can cause all sorts of problems, since windows effectively doesn't know what to do so it just blocks the traffic. Try enabling the firewall service but switching the firewall into passive mode (basically turn it off). – john Aug 05 '13 at 08:04
  • and what exactly makes you think firewalls have anything to do with this problem? – tony roth Aug 05 '13 at 18:33
  • Are you sure you have the right password for Administrator? Also, is this a local account or a domain account? – Katherine Villyard Aug 05 '13 at 18:47
  • @KatherineVillyard think you've hit the nail on the head in this case. – tony roth Aug 05 '13 at 20:02
  • @John Firewall service is up and running but i turned it off. – Shailesh Sutar Aug 07 '13 at 03:19
  • @Katherine Yes i have right password for Administrator. Its a local account. – Shailesh Sutar Aug 07 '13 at 03:20

1 Answers1

2

If this is not related to the firewall, which it sounds like it's not, and you definitely have the correct admin password for the remote machine, then check the following:

  • File and Print Sharing is enabled on the remote (and possibly local) machine.
  • The admin$ share of the remote machine exists and is accessible.

The following article is quite a lengthy explanation of how psexec can work, by Mark Russinovich (creator of the sysinternals suite).

john
  • 1,995
  • 2
  • 17
  • 30
  • File and Print Sharing service and Admin$ share is enabled on the remote machine. But i do not have DC Configured in my premises for windows systems. – Shailesh Sutar Aug 07 '13 at 07:11
  • This should work regardless of whether or not there is a DC available, since you are using a local administrator account. – john Aug 07 '13 at 07:20