Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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: 192.168.0.3):

psexec \\192.168.0.4 -u Administrator -p adminPass ipconfig

return:

Couldn't access 192.168.0.4:
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?

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

3 Answers 3

try using a fully qualified username: psexec \192.168.0.4 -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?

share|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 192.168.140.131: 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

Solved!

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
share|improve this answer

You could try to write password in quotes like:

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

Your Answer

 
discard

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.