none
Problem using rsh thr' a service on Windows Server 2008 RRS feed

  • Question

  •  

    Hi All !
     

    I am calling "rsh" through a service and the rsh is not getting executed on remote machine. I tried redirecting the rsh output, the redirection file got created, but with size 0 bytes. When I run rsh through a DLL or from command line, it works fine giving expected output.

    So, is there any problem calling rsh through a service on Windows Server 2008? 

    Also, the service I am testing on Windows Server 2008, is a VC++ program compiled on Windows Server 2003 using .Net 2003. So, do I need to recompile the my service proj. on Server 2008 ? coz, I checked with other sample programs compiled on Windows Server 2003 work fine with Windows Server 2008.

    I am using rsh from the SUA package given for Windows Server 2008. I tried rsh using posix.exe also.
                    posix /u /c rsh ........
    This worked same as rsh only, but still the results are same. rsh still is not getting executed thr' a service. 
     

    Can anybody help me in this problem ?

     

    -thanks, 
    tulip

    Friday, July 4, 2008 5:38 AM

Answers

  •  

    Hi Tulip,

     

    Please find the updates below:

     

    1.     Calling rsh through a service and rsh is not getting executed on the remote machine.

    -          What is the topology of the local and remote machine(s), what does the infrastructure look like, and what is the call (i.e. how are they) to rsh that should execute on the remote machine?  Also,  what does the firewall on each server look like as far as exceptions and ports/protocols opened to allow rsh to call the rsh on remote machine?

     

    2.     The output got created, but with size of zero.

    -          Not sure what this actually tells us . yet,  It’s worth noting, however.  This doesn’t mean that rsh[remote] ever talked to rsh[local].  Rsh[local] might be simply opening a file handle.

     

    3.     Do we need to recompile on Server 2008?

    -          That would be a reasonable attempt and conclusion, but not likely true.  You could try, however.

     

    Any and all pictures, scribbles, bits of nano-information that you can comfortably share would be much appreciated.

     

    Please provide your official contact details so that we can carry on this discussion offline.

     

    Hope it helps.

     

    Thank you.

     

    Leena

    Wednesday, July 9, 2008 12:25 PM

All replies

  •  

    Hi Tulip,

     

    Please find the updates below:

     

    1.     Calling rsh through a service and rsh is not getting executed on the remote machine.

    -          What is the topology of the local and remote machine(s), what does the infrastructure look like, and what is the call (i.e. how are they) to rsh that should execute on the remote machine?  Also,  what does the firewall on each server look like as far as exceptions and ports/protocols opened to allow rsh to call the rsh on remote machine?

     

    2.     The output got created, but with size of zero.

    -          Not sure what this actually tells us . yet,  It’s worth noting, however.  This doesn’t mean that rsh[remote] ever talked to rsh[local].  Rsh[local] might be simply opening a file handle.

     

    3.     Do we need to recompile on Server 2008?

    -          That would be a reasonable attempt and conclusion, but not likely true.  You could try, however.

     

    Any and all pictures, scribbles, bits of nano-information that you can comfortably share would be much appreciated.

     

    Please provide your official contact details so that we can carry on this discussion offline.

     

    Hope it helps.

     

    Thank you.

     

    Leena

    Wednesday, July 9, 2008 12:25 PM
  • Hi, Tulip, did you get this problem solved?
    I have the same problem.

    I can execute a batch file containing rsh and the command will be sent out to the other linux maching witout a problem. This means that the ports are open and all the rest of it.

    But when this batch file gets kicked from a service, rsh command is not sent out.

    - The service is started as administrator and the batch file is also seems to be run as administrator.
    - The batch file does get executed as a date command before and after "rsh" is logged to a file. (echo %date:/=% %time::=% >> c:\log.txt)

    It seems as "rsh" is kind of skipped or some error happens due to the way of executing it.
    Is there any logs available on SUA or windows or some otherway to find out what is happening?

    @echo off
    echo %date:/=% %time::=% >> c:\log.txt
    echo "%username%" >> c:\log.txt
    start "" "C:\Windows\SUA\bin\rsh" -l admin 192.168.1.20 system shutdown
    echo %date:/=% %time::=% >> c:\log.txt
    @echo on

    Monday, October 5, 2009 4:28 AM
  • Do you guys got this resolved?   I'm having the exact same problem.    I have a .bat file that executes an rsh command.    the .bat works fine when I execute manually or when I run it from a windows scheduled task.   It doesnt work when running from a windows service.

    LArce11

    Wednesday, September 26, 2012 2:48 PM