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