Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 17 Sep 1998 10:18:55 +0200
From:      Florian_Uhl@3com.com
To:        freebsd-questions@FreeBSD.ORG
Subject:   RE: Mount a music cd? Mount not root?
Message-ID:  <C1256682.002DAD59.00@hqoutbound.ops.3com.com>

next in thread | raw e-mail | index | archive | help

Donald,

he was talking about "read-only". I would suggest, he installs 'sudo' and
gives the users restricted rights.

/usr/local/etc/sudoers will probably contain something like

   # User alias specification
   User_Alias USERS=%users
   # Cmnd alias specification
   Cmnd_Alias  MOUNT=/sbin/mount -t msdos -o ro /dev/wd0s1 /mnt/dos_c
   # User privilege specification
   USERS   ALL=(root) NOPASSWD: MOUNT

This _should_ give the local group "users" (from /etc/group) the rights to
mount the DOS partition. Read the man page before enabling this as I'm
sitting at an NT box right now and cannot check the syntax. Additional
benefit: this will get logged via syslogd and the guys can only do what you
want them to do.

Somebody correct me if this is blatantly wrong, insecure or otherwise a
stupid thing to do.

Cheers ...


--
florian
Not talking for or on behalf of 3Com.




To:   Dave Ason <dgason@mindspring.com>
cc:   freebsd-questions@FreeBSD.ORG
Subject:  RE: Mount a music cd? Mount not root?




My secret spy satellite informs me that on 16-Sep-98, Dave Ason wrote:
> Hi there,
>
>     I've got two questions related to mounting file systems.
>     1)How do you mount a music cd? I've tried it with the -t cd9660
> option as with data cd's but with no luck.

Uhh, you can't.  Audio CD's can only be played.  If you want to grab the
digital data off of an audio CD and stuff it on your hard drive, use the
/usr/ports/audio/tosha port.

>     2)Is it possible for a user who is not root to mount a file system?
> I'd like to setup a FAT file system so that any user can mount it read
> only.

I don't think so.  Linux has the "user" mount option to do this, but
(AFAIK) FreeBSD does not.

There is a little trick you can use, though, to get around this.  Just make
the /sbin/mount and /sbin/umount binaries setuid to root, chgrp it to a
group (make a new group "mounters" for this purpose), then make these
executables NOT executable by everyone else.  Then, to allow a user to
mount and unmount stuff, just add him/her to the "mounters" group.  The
permissions of the binaries should look like this:

-r-s--x---   1 root     mounters    73728 Jul 22 01:13 /sbin/mount*
-r-s--x---   1 root     mounters   126976 Jul 22 01:13 /sbin/umount*
---
Donald Burr <dburr@pobox.com> *NEW EMAIL ADDRESS!*      | PGP: Your
WWW HomePage: http://DonaldBurr.base.org/  ICQ#16997506 | right to
Address: P.O. Box 91212, Santa Barbara, CA 93190-1212   | 'Net privacy.
Phone: (805) 957-9666    FAX: (800) 492-5954            | USE IT.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?C1256682.002DAD59.00>