Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

using rexec

Posted on 2006-11-16
30
Medium Priority
?
2,400 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
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 
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 1200 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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

If you build your web application in Visual Studio you'll get at least a few binaries, or .DLL, files in your bin folder. However, there is more compiling to be done. Normally this would happen when an ASP.NET resource within the web site is request…
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…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

660 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