How to create a restricted shell
Wm E Davidsen Jr
davidsen at crdos1.crd.ge.COM
Tue Jan 9 07:05:48 AEST 1990
In article <5946 at cps3xx.UUCP> pantz at 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 at 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
More information about the Comp.unix.wizards
mailing list