I have 2 machines with Windows XP SP2 Professional on the same workgroup;

I can ping each of them from the other one;

My psexec command(run from machine with ip:

psexec \\ -u Administrator -p adminPass ipconfig


Couldn't access
Logon failure: unknown user name or bad password.

I disabled firewall on both machines, psexec can access the other machine very quickly but as I mentioned above every time it says "unknown user name or bad password.";

What is wrong with my psexec command?

  • Fully qualified username solved this issue in my case. – gpuguy Nov 28 '13 at 5:38

try using a fully qualified username: psexec \ -u {targetmachinename}\Administrator -p adminPass ipconfig

That'll tell the machine what context to use for that username. BTW, the "Administrator" account is enabled on that machine, right? Can you manually login using that account?

| improve this answer | |
  • To elaborate, unless specified otherwise psexec (as well as any other command) will use the local account by default. As the local Administrator account is not the same as the remote Administrator account you must tell psexec which one you want to use. Pinging a machine does not require access permissions to the remote machine, at least not in the same sense. – John Gardeniers Aug 28 '12 at 20:30
  • Yes, Administrator account is enabled on both machines and I logged on with Administrator account several times, no problem; I also used you'r advised command (using a fully qualified username), but psexec still says that: "Logon failure: unknown user name or bad password."; If help: I can use remote desktop to connect to the other one without any problem. – ayyob khademi Aug 29 '12 at 5:49
  • Fixed my problem. Was getting: Couldn't access The user name or password is incorrect. --- I can use a standard account but needed to fully qualify username per answer. I also needed "reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\system /v LocalAccountTokenFilterPolicy /t REG_DWORD /d 1 /f", and "sc start RemoteRegistry" (both on target machine). – Straff Oct 6 '13 at 7:50


I must enable Access hidden share on the target PC,

Start > Run > secpol.msc > Local Policies > Security Options > 
Network Access: Sharing and security model for local accounts > Classic – local users authenticate as themselves
| improve this answer | |

This only worked for me when I added credentials using cmdkey:

cmdkey.exe /add:MACHINE_NAME_HERE /user:MACHINE_NAME_HERE\Administrator /pass:PASSWORD_HERE
psexec.exe \\MACHINE_NAME_HERE -i notepad
cmdkey.exe /delete:MACHINE_NAME_HERE

Source: https://stackoverflow.com/a/22044694/4995840

| improve this answer | |
  • Excellent find. This worked for me. – AperioOculus Sep 20 '17 at 17:09

You could try to write password in quotes like:

psexec \\ -u Administrator -p "adminPass" ipconfig
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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