[comp.unix.wizards] How to create a restricted shell

pantz@mth.msu.edu (Tzu-Hsi Pan) (01/09/90)

Could someone tell me how to build up a restricted shell for some user
such that only a couple of commands can be executed under a new root
environment?  Thanks.

-Pan (pantz@mth.msu.edu)

davidsen@crdos1.crd.ge.COM (Wm E Davidsen Jr) (01/09/90)

In article <5946@cps3xx.UUCP> pantz@mth.msu.edu (Tzu-Hsi Pan) writes:
| 
| Could someone tell me how to build up a restricted shell for some user
| such that only a couple of commands can be executed under a new root
| environment?  Thanks.

  rsh works with /bin/sh and ksh. You can either execute the rsh command
(SysV) or execute the shell with the -r flag. You simply set the PATH to
point to a directory containing only the things you want to allow, and
then (assuming a recent shell) set the PATH variable readonly. I usually
create a /usr/rbin directory and link stuff in from /bin and /usr/bin.

Ex:
	PATH=/usr/rbin
	readonly PATH; export PATH

-- 
bill davidsen	(davidsen@crdos1.crd.GE.COM -or- uunet!crdgw1!crdos1!davidsen)
"The world is filled with fools. They blindly follow their so-called
'reason' in the face of the church and common sense. Any fool can see
that the world is flat!" - anon