* Can users mount/umount CDs in DEC Unix 3.2c?
@ 1996-02-26 5:00 lou
1996-02-27 5:00 ` Bob Manners
0 siblings, 1 reply; 3+ messages in thread
From: lou @ 1996-02-26 5:00 UTC (permalink / raw)
We have a group of four AXP Model 250 workstations
running Digital Unix v3.2c. Each workstation has
a CD-ROM drive installed (came that way from the factory).
Is there a way that a user (not root) can mount and
unmount a CD? The reason we wanted CD's is to enable
our users to access large geographic data sets which
come in CD form.
Right now, my reading of mount(1) is that
"To use the mount and unmount commands, you must be root."
I have tried:
[1] as root, chown the mount command to the user.
result: user cannot mount a cd.
[2] run root-setuid script to do [1].
result: user cannot mount a cd.
[3] chmod the cd device to 666.
result: user cannot mount a cd.
[4] as root, chown the cd device to the user.
result: user cannot mount a cd.
The last (untried) bletchery I will try, is to run a
cron job as root (say, every 10 min) that will check
for a 'mount-request' file in the /tmp directory, and,
if it's there, perform a mount of the cd ... and likewise
for an 'unmount-request'... This is awkward, at best.
Is there something obvious I'm missing? e.g. "For security
reasons, only root can mount CDs, so your users are SOL..."
???
Thanks,
Lou.
--
Louis Glassy (lou@giac1.oscs.montana.edu) There be three things which
are too wonderful for me, yea, four which I know not: the way sendmail
remappeth Ruleset 3; the way the IR of gcc worketh; the way of an IP
packet on the net; and the way of a C programmer with pointers. (Prov 32.18)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Can users mount/umount CDs in DEC Unix 3.2c?
1996-02-26 5:00 Can users mount/umount CDs in DEC Unix 3.2c? lou
@ 1996-02-27 5:00 ` Bob Manners
1996-02-29 5:00 ` Steve McLaughlin
0 siblings, 1 reply; 3+ messages in thread
From: Bob Manners @ 1996-02-27 5:00 UTC (permalink / raw)
In some article lou@sun1.giac.montana.edu (lou) writes:
Is there a way that a user (not root) can mount and
unmount a CD? The reason we wanted CD's is to enable
our users to access large geographic data sets which
come in CD form.
Maybe possible. Depends on DEC UNIX (I'm a Linux man myself, but I'm
here since I have a PDP and a microVAX to feed and water at home too
;)
Right now, my reading of mount(1) is that
"To use the mount and unmount commands, you must be root."
Possibly (usually) true - unless you have a nice version of mount.
I have tried:
[1] as root, chown the mount command to the user.
result: user cannot mount a cd.
That will _never_ work. Unless the binary is setUID then its ownership
will change nothing - other than who can execute it according to the
permissions.
[2] run root-setuid script to do [1].
result: user cannot mount a cd.
Generally, for security reasons, setUID scripts do not set the UID ;)
You could use a little C program to do it though. Just use the exec()
system call to call mount with the appropriate switches. Make the C
program setUID root and you should be OK. If you're not too careful
with your code, this could be a security hole. SetUID scripts are
considered just too dangerous.
[3] chmod the cd device to 666.
result: user cannot mount a cd.
mount needs to be able to write to /etc/mtab and also notify the
kernel, so having permissions on the device is not enough.
[4] as root, chown the cd device to the user.
result: user cannot mount a cd.
See my comments for [3]
The last (untried) bletchery I will try, is to run a
cron job as root (say, every 10 min) that will check
for a 'mount-request' file in the /tmp directory, and,
if it's there, perform a mount of the cd ... and likewise
for an 'unmount-request'... This is awkward, at best.
nasty! Should work though ...
I recommend you carefully peruse the mount(1) man page. Linux allows
an oprion (user) in /etc/fstab to allow user mounting of devices,
precisely for this purpose. Failing that the little C program approach
may be the best bet: remember to make it suid root. (chown root.root
foo; chmod u+s foo)
Cheers,
Bob.
--
----------------------------------------------------------------------------
Robert Manners Osney Laboratory
rjm@swift.eng.ox.ac.uk Dept of Engineering Science
University of Oxford
01865 288762
Computer Museum: http://swift.eng.ox.ac.uk/rjm/museum.html
Also: http://swift.eng.ox.ac.uk
"The revolution will not be televised"
----------------------------------------------------------------------------
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: Can users mount/umount CDs in DEC Unix 3.2c?
1996-02-27 5:00 ` Bob Manners
@ 1996-02-29 5:00 ` Steve McLaughlin
0 siblings, 0 replies; 3+ messages in thread
From: Steve McLaughlin @ 1996-02-29 5:00 UTC (permalink / raw)
In article <RJM.96Feb27112758@swift.eng.ox.ac.uk>,
Bob Manners <rjm@swift.eng.ox.ac.uk> wrote:
>In some article lou@sun1.giac.montana.edu (lou) writes:
>
> Is there a way that a user (not root) can mount and
> unmount a CD? The reason we wanted CD's is to enable
> our users to access large geographic data sets which
> come in CD form.
>
Sure use the mountcd program.
Steve Mc
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~1996-02-29 5:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1996-02-26 5:00 Can users mount/umount CDs in DEC Unix 3.2c? lou
1996-02-27 5:00 ` Bob Manners
1996-02-29 5:00 ` Steve McLaughlin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox