home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / unix / shell / 5237 < prev    next >
Encoding:
Internet Message Format  |  1993-01-04  |  2.1 KB

  1. Path: sparky!uunet!zaphod.mps.ohio-state.edu!rpi!crdgw1!rdsunx.crd.ge.com!ariel!davidsen
  2. From: davidsen@ariel.crd.GE.COM (william E Davidsen)
  3. Newsgroups: comp.unix.shell
  4. Subject: Re: How to make Restrict Shell more safely?
  5. Message-ID: <1993Jan4.194925.7364@crd.ge.com>
  6. Date: 4 Jan 93 19:49:25 GMT
  7. References: <cslee.225.726145569@pds.nchu.edu.tw>
  8. Sender: usenet@crd.ge.com (Required for NNTP)
  9. Reply-To: davidsen@crd.ge.com (bill davidsen)
  10. Organization: GE Corporate R&D Center, Schenectady NY
  11. Lines: 39
  12. Nntp-Posting-Host: ariel.crd.ge.com
  13.  
  14. In article <cslee.225.726145569@pds.nchu.edu.tw>, cslee@pds.nchu.edu.tw (Lee Chee Siong) writes:
  15. | Hi,
  16. |   I want to creat a few accounts in Restrict Shell enviroment. In this 
  17. | account, only a few command(e.g. vi, ftp, mail, news) can be used. Is
  18. | there any suggestion to creat this environment to make it more security
  19. | in my system?
  20. |   Any comming is appreciate.
  21.  
  22. Okay, here's how... I'll show it for putting all the users in /guest,
  23. since that's how I do it.
  24.  
  25.   1. Create the directory /guest/bin, and put all the stuff you want in
  26. there, as wellas your shell.
  27.  
  28.   2. Create the guest user accounts, as /guest/user1, or /guest/joe, or
  29. whatever. The sticky bit should be set on these directories, mode 1711
  30. is suggested.
  31.  
  32.   3. Create a .profile file in /guest, *owned by bin*, and link it into
  33. each user's home directory. Set permissions 644. This prevents the user
  34. from changing or deleting the profile. In the profile set the PATH to
  35. /guest/bin and set the variable *readonly*
  36.     PATH=/guest/bin
  37.     export PATH
  38.     readonly PATH
  39.  
  40.   4. Remember that some programs give shell access via escapes, like vi,
  41. emacs, etc. Some versions use PATH and are safe, some use /bin/sh and
  42. are not at all safe.
  43.  
  44.   5. The *really* safe way to have guest users is to run them in a tiny
  45. system of their own using chroot. It is very hard to do this without
  46. losing a lot of functionality, however, so I don't do that. I limit what
  47. they can run, use shadow password, and have been pretty happy with the
  48. resulting security.
  49.  
  50. -- 
  51. bill davidsen, GE Corp. R&D Center; Box 8; Schenectady NY 12345
  52.     Keyboard controller has been disabled, press F1 to continue.
  53.