home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / sys / sgi / 12772 < prev    next >
Encoding:
Text File  |  1992-08-21  |  2.4 KB  |  73 lines

  1. Path: sparky!uunet!zaphod.mps.ohio-state.edu!ub!acsu.buffalo.edu!miskines
  2. From: miskines@acsu.buffalo.edu (Robert J. Miskines)
  3. Newsgroups: comp.sys.sgi
  4. Subject: Re: shutdown by user
  5. Message-ID: <BtD6DI.n2p@acsu.buffalo.edu>
  6. Date: 22 Aug 92 02:46:29 GMT
  7. References: <o6a8rsk@zuni.esd.sgi.com> <on7kv68@rhyolite.wpd.sgi.com> <23754@oasys.dt.navy.mil>
  8. Sender: nntp@acsu.buffalo.edu
  9. Organization: UB
  10. Lines: 60
  11. Nntp-Posting-Host: lictor.acsu.buffalo.edu
  12.  
  13. In article <23754@oasys.dt.navy.mil> hendrix@oasys.dt.navy.mil (Dane Hendrix) writes:
  14. >
  15. >I agree with the need for an /etc/ftpusers entry.  The reason for having 
  16. >a shutdown account was so that a less closely held password could 
  17. >enable users to shutdown the system.  If there is no entry in the 
  18. >/etc/ftpusers file for the shutdown account, the damage possible due
  19. >to disclosure of the shutdown password is nearly(?) as great as that 
  20. >due to disclosure of the root password.
  21. >
  22.  
  23.     Why not just make a link to init called "shutdown2" or
  24. something suid to root, and let people run that...  You could even
  25. make it so that a specific group could shut it down.  Eliminating the
  26. possible guests that may use that machine.
  27.  
  28.     That way, noone has root access, and the machine can be shut
  29. down without fail...  The other thing that I have noticed on Irix is
  30. that in the /etc directory there is a file that looks like this:
  31.  
  32. -rwSr-xr-x   1 root     sys         8240 Jul 11 00:58 /etc/suid_exec
  33.  
  34.     Anyone know anything about this?
  35.  
  36.     There are a variety of ways to do things the secure way...
  37. For instance, writing one's own 'C' program, something like this:
  38.  
  39. -=-=-=- cut here prog.c -=-=-=
  40. #include <stdio.h>
  41. #include <sys/types.h>
  42. #include <signal.h>
  43.  
  44. main()
  45. {
  46. kill(1,1);
  47. exit(0);
  48. }
  49. -=-=-=-= cut here prog.c -=-=-=
  50.  
  51.     Seeing as init is always pid 1, and signal 1 will shut down
  52. the system, that's all you need...  Just remember to compile it with:
  53.  
  54. cc -D_BSD_SIGNALS -o shutdown2 prog.c
  55.  
  56.     The you'd:
  57.  
  58. chown root.[X] shutdown2
  59. chmod 475[X] shutdown2
  60.  
  61. [X]= use your own discretion.
  62.  
  63.     At least that's the way i have it set up here...  And you can
  64. even add it into your toolchest!  Now how's that for convienience?
  65.  
  66.     Don't just create a shell script and suid it to root...  That
  67. would be bad!
  68.  
  69.  
  70.     If you have any questions regarding the following, or you lack
  71. a development system to compile that with, you can send mail to Karl
  72. Vesterling at "kjv@exucom.com", and ask him to mail the binary to you.
  73.