Sign up ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

i'm trying to run an interactive commandline on a remote PC in my LAN using

psexec \\ -u user2 -p pass1234 -c cmd

and I get

Logon failure: unknown user name or bad password.

is there anything I'm missing here? The user is created, I can connect to it with RDP. The host is Windows XP, and I'm running the commands from Windows 7, where I have psexec.exe.

share|improve this question
Are you on a domain? If so what is the format you are using for the user? Also, I don't know if this matters, but are you running psexec on Win 7 at an elevated command prompt? – KCotreau Jun 24 '11 at 22:19
i'm not in a domain – agelmarion Jun 24 '11 at 22:20
elvated not working, do i need to run something on the target computer? – agelmarion Jun 24 '11 at 22:22

4 Answers 4

up vote 5 down vote accepted

I was able to reproduce your problem and fix it thus:

Do The following and hit enter


Navigate to

Local Policies>Security Options

Set the policy "Network Access: Sharing and security model for local accounts" to (Just hit OK: Don't close this out as we will be changing it back).

Guest only – local users authenticate as Guest

Open a command box and run (Dont close this either)

gpupdate /force

Go back and set the policy "Network Access: Sharing and security model for local accounts" back to

Classic - local users authenticate as themselves

Again run

gpupdate /force

It should work now.

share|improve this answer
psexec \\ -u computer_1\user2 -p pass1234 -c cmd – agelmarion Jun 24 '11 at 22:29
yes user is on remote pc, this still not working – agelmarion Jun 24 '11 at 22:30
i'm doing the same now, will put vmware on xp machine – agelmarion Jun 24 '11 at 22:34
Try with a user that has Administrator privileges, or use the option that lets you run a command as the SYSTEM account. Also I think you need to specify full path to the cmd.exe as in c:\windows\system32\cmd.exe. – LawrenceC Jun 24 '11 at 22:52
@ultrasawblade I think he meant cmd as "generic command". The -c switch copies the program in question to the computer, then executes it. In addition, you do not need to put the full path as long as the command is in the system path, for example in the system32 directory. – KCotreau Jun 24 '11 at 23:14

You must ensure the time is synchronized throughout all the machines. If not, psexec will never work on Windows 7 and will report logon failure.

share|improve this answer

I'm not sure whether you're working on your own or part of a larger user domain. I had the same issue and resolved it as follows:


Basically, I prefaced my username with the domain name.

share|improve this answer

Even though this has already been answered, I thought i would post a quick test i just did with this same error / result.. As i might find it in google in a year or two when i forget.

Simply, trying the standard command as in the question above.. I got the same response.. But ..

If i mapped a network drive or browsed to the c$ share, this would then allow psexec to work...

So this might be a hack/shortcut around things allow for the required network auth on another level...

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.