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.

When I run SysInternals PSEXEC to launch a process on a remote machine, if I specify the password in the command line it fails with:

PsExec could not start cmd.exe on web1928:
Logon failure: unknown user name or bad password.

psexec \\web1928 -u remoteexec -p mypassword "cmd.exe"

or

psexec \\web1928 -u web1928\remoteexec -p mypassword "cmd.exe"

If I just specify:

psexec \\web1928 -u remoteexec "cmd.exe"

and type in the password it works just fine.

The originating server is Windows 2003 and the remote server is Windows 2008 SP2. The remoteexec account only exists on the remote server and is a member of the Administrators group.

share|improve this question
2  
Could it be that the password contains characters that need to the password to be in quotes? –  John Gardeniers Apr 22 '10 at 21:42
    
@john - bingo mate! There's a dollar and a grave ($ and ^) in the password. Didn't think these would interfere. Make that an answer and I'll upvote and tick. –  Kev Apr 22 '10 at 22:03
add comment

2 Answers

up vote 4 down vote accepted

Could it be that the password contains characters that need to the password to be in quotes?

share|improve this answer
add comment

If you don't provide a username your current authentication is passed through. When passing the -u paramater you may need to specify the username as DOMAIN\username. I am going to guess that psexec is trying to authenticate as the local account 'remoteexec' on the computer instead of a domain account like you expected.

share|improve this answer
    
Thanks for the reply. I did try specifying WEB1928\remoteexec as the user, but sadly no joy. –  Kev Apr 22 '10 at 20:03
    
@zoredach - john's comment under the question nailed it. But thanks fort the suggestion. –  Kev Apr 22 '10 at 22:04
add comment

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.