home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / sys / sun / admin / 9364 < prev    next >
Encoding:
Text File  |  1992-12-12  |  1.8 KB  |  50 lines

  1. Newsgroups: comp.sys.sun.admin
  2. Path: sparky!uunet!spool.mu.edu!yale.edu!ira.uka.de!Sirius.dfn.de!solaris.rz.tu-clausthal.de!news!ifwsn4!riepe
  3. From: riepe@ifwsn4.ifw.uni-hannover.de (Michael Riepe)
  4. Subject: Re: Need to let Non-Root use Mount
  5. Message-ID: <1992Dec12.054615.11163@newsserver.rrzn.uni-hannover.de>
  6. Sender: news@newsserver.rrzn.uni-hannover.de (News Service)
  7. Reply-To: riepe@ifwsn4.ifw.uni-hannover.de
  8. Organization: University of Hannover (Germany), IFW
  9. References: <hq8qvm+@lynx.unm.edu>
  10. Date: Sat, 12 Dec 1992 05:46:15 GMT
  11. Lines: 37
  12.  
  13. In article @lynx.unm.edu, khan@us17501.mdc.com (Naseer Khan) writes:
  14. |>Hello Sun Gurus,
  15. |>
  16. |>I need to let someone mount a CD on their own but without giving
  17. |>them root privilege.  The mount command requires one to be root.
  18. |>How can I get around this?
  19. |>
  20. |>The command they need to execute is 'mount -r /dev/sr0 /cdrom'
  21. |>So, I thought I'd see if I could put that in a shell file and
  22. |>set it's permission to 4755 (with setuid) and have it owned
  23. |>by root.  I didn't have much hope for this, suspecting that the
  24. |>shell probably wouldn't be passing the user-id around.  Well,
  25. |>I guess I was right in my pessimism.  It gives the same old
  26. |>message 'Need to be root to use mount' or something like that.
  27. |>
  28. |>So, please, can you help me out here?
  29.  
  30. What are you talking about ? On this system (Sparc10, SunOS 4.1.3) the
  31. shell scripts below work fine with owner=root and perms=4755 (and there
  32. is also a similar version for the floppy disk).
  33.  
  34. #!/bin/sh
  35. # cdmount
  36. mount -r /dev/sr0 /cdrom
  37.  
  38. #!/bin/sh
  39. # cdumount
  40. umount /dev/sr0
  41.  
  42. Michael.
  43. -- 
  44.  Michael Riepe               <riepe@ifwsn4.ifw.uni-hannover.de>
  45.  Universit"at Hannover
  46.  Institut f"ur Fertigungstechnik und Spanende Werkzeugmaschinen
  47.  Schlosswender Str. 5               W-3000 Hannover 1 (Germany)
  48.  ...life is a sexually transmitted desease !
  49.  
  50.