home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / unix / admin / 6989 < prev    next >
Encoding:
Text File  |  1993-01-08  |  1.9 KB  |  35 lines

  1. Newsgroups: comp.unix.admin
  2. Path: sparky!uunet!paladin.american.edu!howland.reston.ans.net!zaphod.mps.ohio-state.edu!saimiri.primate.wisc.edu!ames!agate!dog.ee.lbl.gov!news!avalon.nwc.navy.mil!saturn!dejesus
  3. From: dejesus@saturn.nwc.navy.mil (Francisco X DeJesus)
  4. Subject: Re: Shell script to invoke su and mount CD-ROM
  5. Message-ID: <C0Jy5L.2tr@avalon.nwc.navy.mil>
  6. Keywords: su, csh, cd-rom
  7. Sender: usenet@avalon.nwc.navy.mil (NWC News Admin)
  8. Organization: Science Applications International Corp.
  9. References: <1993Jan8.173010.18598@csi.uottawa.ca>
  10. Date: Fri, 8 Jan 1993 20:27:20 GMT
  11. Lines: 22
  12.  
  13. In article <1993Jan8.173010.18598@csi.uottawa.ca> glenn@popeye.genie.uottawa.ca (Glenn Warnock 789-3225 Algonquin Associate) writes:
  14. >
  15. >We would like to allow all users to mount CD-ROM on our netwrok. It seems the only way to do this is to use mount which requires super user provileges.
  16. >
  17. >We are trying to write a script which will invoke su and mount the CD-ROM, but we cannot invoke su in the script and automatically give it the password.
  18. >
  19. >Any suggestions on how to solve this problem?
  20.  
  21. Obvious solution: make the script set-uid. Obvious problem: security hole.
  22. Never, ever, have a set-uid shell script unless there is absolutely no
  23. other alternative (and even then, think twice).
  24.  
  25. One viable alternative is the "sudo" program, which will allow you (root)
  26. to let specific users run specific commands (ex: mount) as root. I've
  27. also seen a "safe" mount/umount program which was posted a long while
  28. back... don't have the sources handy right now but I could find 'em. I'd
  29. probably go with "sudo" myself... check your local archie server...
  30. -- 
  31.       Francisco X DeJesus  ----- S A I C -----  dejesus@chinalake.navy.mil
  32.  ------------------------------------------------------------------------------
  33.   * disclaimer: Opinions expressed here are mine. Typos and errors are yours *
  34.  "Duck Season!" "Rabbit Season!" "...rabbit season." "It's Duck Season! SHOOT!"
  35.