home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / sys / next / sysadmin / 6643 < prev    next >
Encoding:
Internet Message Format  |  1992-11-21  |  2.1 KB

  1. Path: sparky!uunet!haven.umd.edu!umd5!oberon.umd.edu!matthews
  2. From: matthews@oberon.umd.edu (Mike Matthews)
  3. Newsgroups: comp.sys.next.sysadmin
  4. Subject: Re: loginwindow hooks- ARGHHHH!!!!
  5. Message-ID: <17116@umd5.umd.edu>
  6. Date: 21 Nov 92 21:29:54 GMT
  7. References: <1992Nov20.015714.21620@murdoch.acc.Virginia.EDU> <By08zy.Bw2@ux1.cso.uiuc.edu> <1992Nov20.134347.9096@ifi.unizh.ch>
  8. Sender: news@umd5.umd.edu
  9. Organization: /etc/organization
  10. Lines: 44
  11.  
  12. In article <1992Nov20.134347.9096@ifi.unizh.ch> lytras@avalon.physik.unizh.ch (Apostolos Lytras) writes:
  13. >Argghhh.... root runs shellscripts!! DON'T DON'T DON'T! A shellscript
  14. >that is run by root *is* a threat to the security of your system and 
  15. >possibly of many other systems as well. Especially when it is supposed
  16. >to run inattendedly.
  17.  
  18. Bull.
  19.  
  20. Do you know how many shell scripts there are on your system?  How 'bout
  21. /etc/rc?  Guess who runs it.
  22.  
  23. SETUID shell scripts, now there's a problem.  Not to mention *writeable*
  24. shell scripts that root runs.
  25.  
  26. >Besides, your programs look like a lot of redundancy to me. Every Login
  27. >and Logout gets logged (with time, connecting host etc.) in
  28. >/usr/adm/wtmp. There is also information about shutdowns, reboots and
  29. >crashes in that file.
  30.  
  31. Until NeXTstep 3.0, console logins weren't logged anywhere except maybe
  32. process accounting if you do that (and everyone should; can't hurt and it's
  33. of great help to determine what went wrong).
  34.  
  35. >Cheers
  36. >- A.
  37.  
  38. If you want to give users a login hook, uh, hook, just have a little check
  39. like:
  40.  
  41. if [ -f /users/home/dir/$1/.loginhook ]; then
  42.     /bin/su - $1 -c /users/home/dir/$1/.loginhook
  43. fi
  44.  
  45. Runs their file $HOME/.loginhook as them.  Does anyone know of a way to
  46. specify a home dir of a user other than your own?  There's always finding it
  47. out via getpwent'isms, but something like ~$1 in sh.  I know you can always
  48. write it in csh, but, well, I don't want to.
  49. ------
  50. Mike Matthews, matthews@oberon.umd.edu (NeXTmail accepted)
  51. ------
  52. Skinner's Constant (or Flannagan's Finagling Factor):
  53.     That quantity which, when multiplied by, divided by, added to,
  54.     or subtracted from the answer you get, gives you the answer you
  55.     should have gotten.
  56.