home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!gatech!rpi!crdgw1!rdsunx.crd.ge.com!ariel!davidsen
- From: davidsen@ariel.crd.GE.COM (william E Davidsen)
- Newsgroups: comp.unix.shell
- Subject: Re: How to make Restrict Shell more safely?
- Message-ID: <1993Jan4.200035.7840@crd.ge.com>
- Date: 4 Jan 93 20:00:35 GMT
- References: <cslee.225.726145569@pds.nchu.edu.tw> <1993Jan4.194925.7364@crd.ge.com>
- Sender: usenet@crd.ge.com (Required for NNTP)
- Reply-To: davidsen@crd.ge.com (bill davidsen)
- Organization: GE Corporate R&D Center, Schenectady NY
- Lines: 29
- Nntp-Posting-Host: ariel.crd.ge.com
-
- In article <1993Jan4.194925.7364@crd.ge.com>, davidsen@ariel.crd.GE.COM (william E Davidsen) writes:
-
- | Okay, here's how... I'll show it for putting all the users in /guest,
- | since that's how I do it.
- |
- | 1. Create the directory /guest/bin, and put all the stuff you want in
- | there, as wellas your shell.
-
- Sorry to followup my own posting, but I forgot to mention that you put a
- dummy sh program in the /guest/bin directory, which calls rsh (or sh
- with the -r arg).
-
- Something like:
- main(argc,argv)
- {
- argv[0] = "rsh";
- execvp("rsh", argv);
- }
-
- Since PATH only allows running programs from /guest/bin and the user
- can't write there, ill behaved user programs can't be executed (nor
- should you allow access to a compiler).
-
- Followups please note any major holes in this (I've run it for years, so
- I probably have a fix I didn't mention).
-
- --
- bill davidsen, GE Corp. R&D Center; Box 8; Schenectady NY 12345
- Keyboard controller has been disabled, press F1 to continue.
-