Solved

using rexec

Posted on 2006-11-16
30
2,365 Views
Last Modified: 2012-05-05
Hello. I try to use rexec to execute a program on another XP pro machine. But I can't get it to work. I have started Remote Program Execution in Services and also allowed Remote Program Execution to interact with desktop with this service.

What I try to do is to start notepad.exe on the other machine like this.

rexec computername notepad.exe
then I must enter
Name: (computername:currentuser):
Password: (computername:currentuser):

I have tried to enter a valid username and password but only this happens....

> rexec:connect: Connection refused
rexec: can not establish connnection

Any suggestions?
0
Comment
Question by:m-jansen
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 16
  • 13
30 Comments
 
LVL 66

Expert Comment

by:johnb6767
ID: 17958450
have you tried the username format domain\username , and if a workgroup use the remote ws name as the domain?
0
 
LVL 66

Expert Comment

by:johnb6767
ID: 17958479
Also, any firewalls on the other systems that could be blocking this traffic?
0
 

Author Comment

by:m-jansen
ID: 17959087
I have tried with the IP adress as computername... that should be enough? The computer I am conntction to is not connected to a domain. I have also disabled all firewalls and antivirus stuff. But it does not help.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 8

Expert Comment

by:YoungBonzi
ID: 17968432
Are you using the remote computers Administrator login?
0
 

Author Comment

by:m-jansen
ID: 17968608
maybe not... so there is a remote computers Administrator login? I thought a full Administrator would be enught(for remote dektop in XP pro I can login with my normal admin user). Is it possible at all to start programs on the other machine and get it to pop up on the screen on the machine I start the program on?
0
 

Author Comment

by:m-jansen
ID: 17968725
Sorry i misunderstood a little...
I don't use remote computers Administrator login, but the command line and the rexec.
0
 
LVL 66

Accepted Solution

by:
johnb6767 earned 300 total points
ID: 17968749
Personally, I have always preferred PSEXEC.exe from sysinternals...

PsExec v1.72
http://www.microsoft.com/technet/sysinternals/ProcessesAndThreads/PsExec.mspx

Nothing needed to install on the other machine as well...

To open a dos shell on the remote machine.....

psexec.exe \\computername -u domain\userid -p password -i cmd.exe

The -i switch forces interaction with teh remote desktop....

0
 

Author Comment

by:m-jansen
ID: 17968816
I've actually checked it out. If I am not using a domain only simple dhcp LAN, is the userid then just etc. Administrator?
0
 

Author Comment

by:m-jansen
ID: 17968830
If I am already loggen on does it still work to use PsExec to use this use?
0
 
LVL 66

Expert Comment

by:johnb6767
ID: 17968891
If the Admin passwords are all the same, should be fine. It will automatically assume the domain is the remote workstation.....

In that context DOMAIN=COMPUTERNAME

So If you are trying to connect to BOBSPC...

psexec.exe \\BOBSPC -u BOBSPC\userid -p password -i cmd.exe
0
 

Author Comment

by:m-jansen
ID: 17968982
Thanks that explains a lot. But it still not work.

Couldn't access: COMPUTERNAME
No access.
0
 
LVL 66

Expert Comment

by:johnb6767
ID: 17969103
Ok.....Can you access the files via \\BOBSPC?
0
 

Author Comment

by:m-jansen
ID: 17969151
Yes. Like this. Start -> Run enter \\MyPc
0
 

Author Comment

by:m-jansen
ID: 17969270
It also works to remote login to \\MyPc with remote dektop
0
 
LVL 66

Expert Comment

by:johnb6767
ID: 17969279
paste the command that you are using for psexec please, if you dont mind.

keep in mind that you need to run that command from the same folder in DOS...If it was a permissions issue, it should come back Access Denied.
0
 

Author Comment

by:m-jansen
ID: 17971017
This is the command I am using

psexec \\Mj -u Mj\Administrator -p password -i notepad.exe

and I am running it from the folder

c:\temp\PsTools

from DOS or cmd
0
 

Author Comment

by:m-jansen
ID: 17971028
0
 
LVL 66

Expert Comment

by:johnb6767
ID: 17972676
have never used it, but a quick glance looks like it requires SL to be on teh target systems......If not a lot of systems, then no biggie....

And your syntax is fine....Psexec uses the Admin share C$..Try one last thing for me....

net use z: \\mj password /user:mj\administrator /persistent
(just replace the password obviously....)
 I saw you can access the share via UNC, but I just want to see if you can map that drive to the C$. If successful, retry psexec just for giggles.......
0
 

Author Comment

by:m-jansen
ID: 17972726
I get syntax error when running "net use z: \\mj password /user:mj\administrator /persistent" from cmd.
With SL you mean software on the taget system?
What does Admin share C$ means?
0
 
LVL 66

Expert Comment

by:johnb6767
ID: 17972973
Admin share on every PC, is a hidden share. it is indicated by the $ sign..

And thats my bad...

net use z: \\mj password /user:mj\administrator /persistent:yes

left off the last part....
0
 

Author Comment

by:m-jansen
ID: 17974227
with "net use z: \\mj password /user:mj\administrator /persistent:yes"
I get system error 53

Networkpath not found.

I can ping Mj
0
 
LVL 66

Expert Comment

by:johnb6767
ID: 17976287
Ok, from a Start>Run

\\mj\c$

Do you get prompted for a login box, and can you access files after putting credentials?

username - mj\administrator
password -
0
 

Author Comment

by:m-jansen
ID: 17979564
Hmm...The user name that pops up is MJ\Guest and I can't change it.
0
 
LVL 66

Expert Comment

by:johnb6767
ID: 17979885

How to Set Security in Windows XP Professional That Is Installed in a Workgroup
http://support.microsoft.com/kb/290403/en-us

I believe that is controlled by the ForceGuest=0 value in
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa

I might be wront on the exact key though, but thaqts probably why psexec isnt working, as it cant access the admin shares....
0
 
LVL 66

Expert Comment

by:johnb6767
ID: 17979911
Similarly, if you disable Simple File Sharing it should have simliar results to teh Force Guest value...
0
 

Author Comment

by:m-jansen
ID: 17980901
Hey it worked! Does this works different when using a domain? Is it secure?
0
 

Author Comment

by:m-jansen
ID: 17980955
Is there a way to send the password unseen?
0
 
LVL 66

Expert Comment

by:johnb6767
ID: 17981022
I may be wrong, dont really use that Key, but as long as the share permisions are correct, I wouldnt see why not...
0
 

Author Comment

by:m-jansen
ID: 17981090
Ok, thanks a lot. I understand I can hide the password by not using the -p.
0
 
LVL 66

Expert Comment

by:johnb6767
ID: 17981396
Oh, hide the password in the psexec....Yea, if you leave out the -u or the -p it will simply prompt for it.....sorry, didnt realize which portion of teh question you were asking about....

Glad your up and running though....
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Step by step guide to Clean and Sort your windows registry! Introduction: Always remember: A Clean registry = Better performance = Save your invaluable time In this article we're going to clear our registry manually! Yes, manually! The e…
When you start your Windows 10 PC and got an "Operating system not found" error or just saw  "Auto repair for startup" or a blinking cursor with black screen. A loop for Auto repair will start but fix nothing.  You will be panic as there are no back…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

740 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question