Path: utzoo!utgpu!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!unmvax!ncar!gatech!mcnc!ece-csc!ncrcae!ncrlnk!uunet!mcvax!hp4nl!philmds!leo From: leo@philmds.UUCP (Leo de Wit) Newsgroups: comp.unix.wizards Subject: Restricted shell (was Re: rsh environment) Keywords: no /etc/profile sourced? Message-ID: <901@philmds.UUCP> Date: 25 Dec 88 12:34:39 GMT References: <1276@uwbull.uwbln.UUCP> <14640@cisunx.UUCP> Reply-To: leo@philmds.UUCP (Leo de Wit) Organization: Philips I&E DTS Eindhoven Lines: 50 In article <14640@cisunx.UUCP> jcbst3@unix.cis.pittsburgh.edu (James C. Benz) writes: |In article <1276@uwbull.uwbln.UUCP> ckl@uwbln.UUCP (Christoph Kuenkel) writes: |>Is there any way to alter the default environment setting used when |>rsh (the bsd remote shell) executes commands? |> |>our rsh (bull sps9 with spix os) sets up an default environment |> |HUH? (cr,h,...)ackers anyone? Isn't rsh RESTRICTED shell? Anyway, |why not just set these in .profile using standard UNIX syntax ala |HOME=/usr/mydirectory;export HOME |That is, if you have permissions on .profile. |Or is YOUR UNIX *different* than mine (AT&T)? Definitely. The guy said bsd. 'rsh' was also a surprise to me when I first worked in a System V environment. The BSD /bin/sh has also a notion of restriction, although I never saw it documented (not in sh(1) nor in S. R. Bourne's 'An Introduction to the UNIX Shell'). The following is run on an Vax running Ultrix: Script started on Sun Dec 25 13:15:02 1988 philmds> sh philmds> set -r philmds> pwd /usr/leo philmds> cd .. cd: restricted philmds> cd / cd: restricted philmds> cd News cd: restricted philmds> ls bin [my bin directory is listed]... philmds> /bin/ls bin /bin/ls: restricted philmds> ^Dphilmds> script done on Sun Dec 25 13:17:20 1988 Restriction seems to imply both not to be able to change the working directory and execute only commands that are found using $PATH (they may not contain a slash). I'm interested both in what restriction means in System V, and whether there is any documentation about -r (set -r, sh -r) for the BSD /bin/sh. Furthermore I'm interested in hearing about its use (for what, and how). Leo.