473,385 Members | 1,693 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Probelm when 'rsh' to Solaris 8

TL
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
on?

Thanks,
Tom

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/test.sh $firstName
$lastName\"">;
?>

Shell script on Unix box:

#!/bin/sh
firstName=$1
lastName=$2
echo Your name is: $firstName $lastName
exit 0
Jul 17 '05 #1
3 3859
On 1 Oct 2004 11:20:48 -0700, tm*******@yahoo.com (TL) wrote:
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
on?

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/test.sh $firstName
$lastName\"">;
?>
Could you post the real script?

Where did you get rsh from on Windows? Cygwin, Microsoft SFU, something like
that?
Shell script on Unix box:

#!/bin/sh
firstName=$1
lastName=$2
echo Your name is: $firstName $lastName
exit 0


--
Andy Hassall / <an**@andyh.co.uk> / <http://www.andyh.co.uk>
<http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool
Jul 17 '05 #2
TL
I missed two lines in php code. The complete php script should read
like:

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

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/test.sh $firstName $lastName"

Thanks,
Tom
Andy Hassall <an**@andyh.co.uk> wrote in message news:<md********************************@4ax.com>. ..
On 1 Oct 2004 11:20:48 -0700, tm*******@yahoo.com (TL) wrote:
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
on?

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/test.sh $firstName
$lastName\"">;
?>


Could you post the real script?

Where did you get rsh from on Windows? Cygwin, Microsoft SFU, something like
that?
Shell script on Unix box:

#!/bin/sh
firstName=$1
lastName=$2
echo Your name is: $firstName $lastName
exit 0

Jul 17 '05 #3
TL
OK, I played more with rsh and it 'almost' pointed to IIS or PHP:

This is my original test php script:
test.php
<?php
$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:
c:\myweb\home\test.bat:
rsh remoteunix -l username "ls"

and changed the test.php to:
<?php
$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
"ls"

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?

Thanks,
Tom

tm*******@yahoo.com (TL) wrote in message news:<74**************************@posting.google. com>...
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
on?

Thanks,
Tom

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/test.sh $firstName
$lastName\"">;
?>

Shell script on Unix box:

#!/bin/sh
firstName=$1
lastName=$2
echo Your name is: $firstName $lastName
exit 0

Jul 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Tony | last post by:
what package should I be downloading for solaris intel. Is there a howto on how to install it for solaris intel?
0
by: David H | last post by:
Background. I'm running on WinXP w/ MS Services for Unix installed (to give rsh/rlogin ability), both Python 2.3 and 2.4 version. In linux, I'm running RHEE with python2.3 version. The code...
1
by: sc0ri0n | last post by:
Hi, I want to be able to tail -f log files on a different machine and display the results in a web page. Below code from the cgi works: $cmd = "rsh -l $acc $Host tail -f $LogFileName |";...
0
by: rh0dium | last post by:
Hi all, I don't understand the signal module. I guess I understand what it does in principle but I can't figure out how to use it to timeout an external rsh command after a 5 seconds. Does...
1
by: Ben Eisenstein | last post by:
DB2 V8.1 uses rsh to comunicate commands to the engine even if you are not partitioned. Our security department would like to get rid of rsh. Has anyone successfully used ssh? We were thinking of...
0
by: Mike Q | last post by:
Hello, I was wondering if anyone could point me to information on how to create an RSH interface/client with C#. I know RSH is not the safest way to go about things, but the machine, I am...
2
by: kepioo | last post by:
Hi all, I am trying to install PIL with python 2.3 on solaris X86, but I get this error message : building '_imaging' extension creating build/temp.solaris-2.10-i86pc-2.3 creating...
1
by: jordan.mccheyne | last post by:
I am running an RSH command through a Visual Studio 2005 app written in c++. I am using a ShellExecuteEx to run the command. If the user has Windows 2000, the RSH command completes correctly but...
1
by: jordan.mccheyne | last post by:
I am running an RSH command through a Visual Studio 2005 app written in c++. I am using a ShellExecuteEx to run the command. If the user has Windows 2000, the RSH command completes correctly but...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.