[comp.unix.wizards] rsh problems

sysop@stech.UUCP (Jan Harrington) (08/02/87)

A couple of months ago we moved our bbs from an AT&T 7300 to a 3B2/400.
BBS users log on into individual accounts under the restricted shell
(/bin/rsh). The BBS shell scripts which worked on the 7300 don't work
on the 3B2 in a couple of cases, and I'm stumped!

1. Mail doesn't work.  When a restricted shell user types mail, the 3B2
will accept the typed message, but doesn't seem to recognize CTRL-D or 
a period in the first postion on a line to send the message.

2. The line L=`expr $L + 1` generates a syntax error, though the script
containing that line works perfectly under the standard shell (/bin/sh).

Any hints or clues would be greatly appreciated.

Thanks in advance!

Jan Harrington, sysop
Scholastech Telecommunications
seismo!husc6!amcad!stech!sysop

wh%CXA.DARESBURY.AC.UK@cunyvm.cuny.edu (Bill Purvis) (06/05/89)

Dennis G. Rears <drears@MIL.ARMY.PICA> writes:
>  I am on a VAX 8600 running ULTRIK 2.0 trying to execute a rsh on a
>SUN386i running SUNOS 4.0.1 (hostname drun).  My login name on both
>machines is drears and I have .rhosts configured properly to rlogin/rsh
>between machines.
>
> I am trying to run the following command on the VAX:
>
>tar -cf - .|rsh drun  tar xf -
>
>I get the error message back:
>
>stty:  operation not support on socket
>
We had the same problem, and eventually figured out that it was
caused by the presence of an `stty' command in the .cshrc file on the
remote machine.  We just deleted it but if you can figure out whether
you are being invoked remotely, you could bypass it in this case but
let it execute when invoked normally. Can anyone suggest the best
method for doing this. I am sure I have seen it somewhere!

Bill Purvis,
SERC, Daresbury Lab, England
wh@uk.ac.dl.cxa        (JANET)

lance@kodak.UUCP (Dan Lance) (06/10/89)

In article <23219.8906050826@cxa.daresbury.ac.uk> wh%CXA.DARESBURY.AC.UK@cunyvm.cuny.edu (Bill Purvis) writes:
>Dennis G. Rears <drears@MIL.ARMY.PICA> writes:
>>  I am on a VAX 8600 running ULTRIK 2.0 trying to execute a rsh on a
>>SUN386i running SUNOS 4.0.1 (hostname drun).  My login name on both
>>machines is drears and I have .rhosts configured properly to rlogin/rsh
>>between machines.
>>
>> I am trying to run the following command on the VAX:
>>
>>tar -cf - .|rsh drun  tar xf -
>>
>>I get the error message back:
>>
>>stty:  operation not support on socket
>>
>We had the same problem, and eventually figured out that it was
>caused by the presence of an `stty' command in the .cshrc file on the
>remote machine.  We just deleted it but if you can figure out whether
>you are being invoked remotely, you could bypass it in this case but
>let it execute when invoked normally. Can anyone suggest the best
>method for doing this. I am sure I have seen it somewhere!
>
>Bill Purvis,
>SERC, Daresbury Lab, England
>wh@uk.ac.dl.cxa        (JANET)

Put 

if (! $?prompt) exit

at the top of your .cshrc.

--drl
Daniel R. Lance / drl@kodak.com / Eastman Kodak Company, Federal Systems Div.



























i hate inews

envbvs@epb2.lbl.gov (Brian V. Smith) (06/10/89)

> In article <23219.8906050826@cxa.daresbury.ac.uk> wh%CXA.DARESBURY.AC.UK@cunyvm.cuny.edu (Bill Purvis) writes:

[ stuff about stty inside the .cshrc file being a no-no. ]

In article <1921@kodak.UUCP>, lance@kodak.UUCP (Dan Lance) writes:
 
> Put 
> 
> if (! $?prompt) exit
> 
> at the top of your .cshrc.
         ^^^

Not at the top! :-)

We have useful things in our .cshrc files that are desirable when
doing remote shells and non-interactive shells.

Certainly put the above "if" (and a "then") AROUND any stuff that 
is done to the tty (actually that stuff can usually go in the .login 
file instead), but one need not be so drastic as to exit from 
the .cshrc altogether.

Then:
>
>

 [many blank lines]
 
> 
> 
> i hate inews

You too?  I have had to put in some blank lines several times
when I've only added $.02 worth to postings. :-)

Brian V. Smith
Lawrence Berkeley Laboratory
Usual disclaimers apply in case of emergency