Link to home
Start Free TrialLog in
Avatar of nesher13
nesher13Flag for Israel

asked on

Psexec error

Hi guys
When I run the command psexec \\ compname gpresult  I get

Open in new window

ERROR: Logon failure: unknown user name or bad password.
gpresult exited on compname  with error code 1.

Open in new window


 At the same time,  At the same time, the command psexec \\ compname ipconfig  is run normally,
User which run both  the commands  is  Domain admin,remote comp is winxp

Please help
SOLUTION
Avatar of Emmanuel Adebayo
Emmanuel Adebayo
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
You can pass a username in PSEXEC as follows:

psexec \\compname -u {domain}\{username} -p {password} gpresult

My oersonal experience is that if you gat error with PSEXEC it is "usually" authentication if the command passed well formed i.e. correct.

Good luck!
Avatar of nesher13

ASKER

I did everything as you recommend, but I get the same error.
Have you got a space between the \\ and the compname?
The computers on which I tried to debug the exec command is what is incomprehensible state, on the one hand, he responds to the ping and psexec \ \compname ipconfig, on the other hand, he does not answer the original command, and also on the VSC. I moved to another home computer (in same OU), which was responsible for VNC and tried to run a command psexec \\compname2  gpresult and get :

Couldn't access The network path was not found.
Make sure that the default admin$ share is enabled on compname2.


Then I checked the group policies, and it turned out that the file and printer sharing exceptions are open to the old ip addresses domain admins. I corrected the addresses and is now waiting for the user restarts the computer
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial