Probelm when 'rsh' to Solaris 8

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Please help.  I need to get this problem resolved ...

When I ran remote shell to a Sun Solaris 8 box from W2K box, the DOS'
CMD window popped up and stayed there until CGI timeout.  The funny
thing was that it did run the Unix script and turned out the right
result.  Just the CMD window ...  I had to kill the window by clicking
on 'x'.  After that it displayed CGI timeout error.  What was going


Environment - IIS 5, PHP 4.3.9, Windows 2000, Solaris 8.

PHP script on Windows 2K:

<? php
/* Call a script on a remote unix box to display the name */
system <"rsh remoteunix -l thisuser \"/mybin/ $firstName

Shell script on Unix box:

echo Your name is: $firstName $lastName
exit 0

Re: Probelm when 'rsh' to Solaris 8

On 1 Oct 2004 11:20:48 -0700, (TL) wrote:

Quoted text here. Click to load it

 Could you post the real script?

 Where did you get rsh from on Windows? Cygwin, Microsoft SFU, something like

Quoted text here. Click to load it

< Space: disk usage analysis tool

Re: Probelm when 'rsh' to Solaris 8

I missed two lines in php code.  The complete php script should read

<!-- test.php -->
$firstName = "Tom";
$lastName = "Lee";
system("rsh remoteunix -l thisuser \"/mybin/ $firstName

This is a very simplified test script.  I made this one to see how rsh
is to be done under PHP.  The rsh should be the one came with the W2K
installation.  The same rsh calling string was tested by entered
directly into CMD window without problem.

Start -> Run -> cmd, then on the DOS command line:
rsh remoteunix -l thisuser "/mybin/ $firstName $lastName"


Quoted text here. Click to load it

Re: Probelm when 'rsh' to Solaris 8

OK, I played more with rsh and it 'almost' pointed to IIS or PHP:

This is my original test php script:
$rl = system ("rsh rmoteunix -l username \"ls\"", $rc);
echo $rc;
echo $rl;
The result of running this test.php was $rc=1 and balnk in $rl, and
'ls' wasn't executed on the remoteunix.

So I put the rsh line into a test.bat:
rsh remoteunix -l username "ls"

and changed the test.php to:
$rl = system ("c:\myweb\home\test.bat");
echo $rc;
echo $rl;

Now in the browser it showed
C:\MyWeb\Home>rsh remotehost -l username "ls" remotehost: remuser too
long rsh: can't establish connection
and $rc is blank and $rl "C:\MyWeb\Home>rsh remoteunix -l username

However, if I ran test.php from cmd window (c:\php>php
c:\myweb\home\test.php), I could get 'ls' executed from both cases.

Where does this lead to?  I'd assume IIS or PHP changed something such
as logon name.  Does anyone have experienced this problem?

Tom (TL) wrote in message
Quoted text here. Click to load it

Site Timeline