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
Who is Participating?
wynandkunkelConnect With a Mentor Commented:
Group policy changes are refreshed every 15 minutes by default, so you do not have to wait for a reboot.
Emmanuel AdebayoConnect With a Mentor Global Windows Infrastructure Engineer - ConsultantCommented:
It need authentication against so as to run the GPO as this need to read the registry get the GPO result

You might need to use Runas command with account that have admin priviledge on the remote computer.

i.e runas /user:<username> /netonly cmd

This will ask for the password and take you the command prompt.

You can now run psexec \\ compname gpresult
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!
Train for your Pen Testing Engineer Certification

Enroll today in this bundle of courses to gain experience in the logistics of pen testing, Linux fundamentals, vulnerability assessments, detecting live systems, and more! This series, valued at $3,000, is free for Premium members, Team Accounts, and Qualified Experts.

nesher13Author Commented:
I did everything as you recommend, but I get the same error.
Have you got a space between the \\ and the compname?
nesher13Author Commented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.