Solved

using rexec

Posted on 2006-11-16
30
2,332 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
  • 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
 
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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Migration of Exchange mailbox can be done with the ExProfre.exe tool. But at times, when the ExProfre.exe tool migrates the Exchange Server user profile, it results in numerous synchronization problems. Synchronization error messages appear in the e…
cPanel is a Unix based web hosting control panel that provides a graphical interface and automation tools designed to simplify the process of hosting a web site. cPanel utilizes a 3 tier structure that provides functionality for administrators, rese…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

757 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now