psexec error "access denied"

Hi,

I am trying to execute a program remotely on another computer using psexec. Therefore I created a user account which has administrational rights on that machine. The Path to the program is known and the program does not need to be copied to that remote machine. For launching the program I use a command script which passes some arguments to the program. The program is an interactive application which should be aware of user input on the remote computer.

I tried the following commands:

psexec \\remote -u user -p pwd -e -i path\to\program.exe
psexec \\remote -u user -p pwd -e path\to\program.exe
psexec \\remote -u user -p pwd -i path\to\program.exe
psexec \\remote -u user -p pwd path\to\program.exe

Unfortunately it seems that some kind of permission has to be present for the user to execute the program since I get always the error "access denied".

Any ideas what i am doing wrong or what kind of permission i forgot?


best regards

Lars
califaxAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

lacamsCommented:
Is the domain of the username that you use, the same domain than your account ?

Else used :
psexec \\remote -u "domain\user" -p "pwd" path\to\program.exe

christophe
0
califaxAuthor Commented:
The target machines are not members of a domain. They are just connected via a crossed ethernet cable and are members of a workgroup. This is why I tried using the name of the computer instead of a domain name. The machines are fsc1 and fsc2. On both machines there exists a user account "herbert" which has administrative rights (e.g. it is member in the administrators group). When I tested from fsc1, I used:

psexec \\fsc2 -u FSC2\herbert -p herbertsPW -e command

This always gave me the result "access denied".


Lars
0
GalCommented:
I would guess that the passwords on the two machines are different for their respective users?
My suggestion: do not use the same user name for both. use something else for the second machine.
Otherwise, use the same password for that username on both machines. this will also do the trick (although much less secure, which I guess is not a problem here, since you got the machines crosswired).

Since you are logged in as herbert on the first machine, and already have a connection to the second machine with that name, what happens when you execute something on the 2nd machine, with the same username in the parameter (even with a different  domain/computer name), is that windows will disregard the domain/computer part and only take the username part. therefore, since those accounts have different passwords, you get the access denied.
this is by design of the authentication algorithm, as far as I can remember it..
Hope it helps.
Ciao,
ZG.

0
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

califaxAuthor Commented:
I understand what you're saying. unfortunately the passwords are the same.

Maybe I should have said this earlier. I am using Windows XP Pro. Could it be that the authentication scheme has changed there?

sry, if this has been a crucial information.

thanks,

Lars
0
lacamsCommented:
Have you tried without username informations ?

psexec \\fsc2 command

chris
0
califaxAuthor Commented:
yes, I tried that too


Lars
0
lacamsCommented:
what is the command that you used ?

chris
0
lacamsCommented:
to be sure that is a psexec problem : Have you tried to run this command ?

(it's necessary that a user are logged on the target computer)
psexec \\fsc2 explorer.exe

If it works, could you check your command.exe(be careful if this command must be used with an specially account)

chris
0
GalCommented:
Hi again,
I've re-read the whole thing, and it seems to me that we've overlooked something, so let's go to the basics:
1. both machines are wxp, in a workgroup, right?
2. both machines have a username herbert, same pwd, on them, with admin rights.
3. you're logged on as herbert on machine1
If I'm right so far then let's try the following:

1. try to connect to machine2's c$.  this will show you if ou have admin rights on the other machine too.
if you can, we're good, and you can try that psexec again (with the connection intact).
2. if you can't (as I suspect), then you simply don't have perms on the second machine... put machine1\herbert in the adminsgroup of machine2... then try again

As far as psexec: the way it actually works, is that it installs a service on machine2, then that service runs yor command using the RunAs api... Now,assuming I'm correct, if you're not admin on machine2, the Access denied error actually comes from failing to install the service, not running the cmmand itself.

Sorry for the long comments.... :)
good luck.
ZG
0
bbaoIT ConsultantCommented:
use "psexec -s" with your other parameters, that it goes fine.
0
bbaoIT ConsultantCommented:
califax, are you here with us? i am VERY sure that "psexec -s" is your solution, just have a try.
0
cjwjordanCommented:
I am having the same problem.  I don't think it is anything to do with pstools/psexec.  I cannot connect to Computer Management on the affected machines either.  Some suggestions that have worked for other people have included looking at firewall setings to see if they let RPC through.  You could also try permissions on the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurePipeServers\winreg key (see question 20755493 at http://www.experts-exchange.com/Operating_Systems/WinXP/Q_20755493.html).  These haven'y worked for me, but they were good ideas.
0
cjwjordanCommented:
Just fixed it -- Windows XP enables Simple File Sharing by default.  It treats all network users as Guest accounts.  Because of this you get Access Denied messages for a range of things including pstools, accessing C$ shares and remotely operating Computer Management. When I disabled it it all started working.   You can find it in Folder Options at the bottom of the view tab.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
califaxAuthor Commented:
Great. This solved the problem immediately ;) I thank all you guys very much for your help. (@bbao: I was with you all the time ;)
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows Networking

From novice to tech pro — start learning today.

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.