home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!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.194925.7364@crd.ge.com>
- Date: 4 Jan 93 19:49:25 GMT
- References: <cslee.225.726145569@pds.nchu.edu.tw>
- 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: 39
- Nntp-Posting-Host: ariel.crd.ge.com
-
- In article <cslee.225.726145569@pds.nchu.edu.tw>, cslee@pds.nchu.edu.tw (Lee Chee Siong) writes:
- | Hi,
- | I want to creat a few accounts in Restrict Shell enviroment. In this
- | account, only a few command(e.g. vi, ftp, mail, news) can be used. Is
- | there any suggestion to creat this environment to make it more security
- | in my system?
- | Any comming is appreciate.
-
- 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.
-
- 2. Create the guest user accounts, as /guest/user1, or /guest/joe, or
- whatever. The sticky bit should be set on these directories, mode 1711
- is suggested.
-
- 3. Create a .profile file in /guest, *owned by bin*, and link it into
- each user's home directory. Set permissions 644. This prevents the user
- from changing or deleting the profile. In the profile set the PATH to
- /guest/bin and set the variable *readonly*
- PATH=/guest/bin
- export PATH
- readonly PATH
-
- 4. Remember that some programs give shell access via escapes, like vi,
- emacs, etc. Some versions use PATH and are safe, some use /bin/sh and
- are not at all safe.
-
- 5. The *really* safe way to have guest users is to run them in a tiny
- system of their own using chroot. It is very hard to do this without
- losing a lot of functionality, however, so I don't do that. I limit what
- they can run, use shadow password, and have been pretty happy with the
- resulting security.
-
- --
- bill davidsen, GE Corp. R&D Center; Box 8; Schenectady NY 12345
- Keyboard controller has been disabled, press F1 to continue.
-