automounting cd-rom & cd-rw devices

Jay Moore jaymo at cromagnon.cullmail.com
Sun Mar 28 12:55:05 PST 2004


On Sunday 28 March 2004 12:44 am, Malcolm Kay wrote:
> On Sunday 28 March 2004 11:43, Jay Moore wrote:
> > I have a FreeBSD 4.9 system; I am also running KDE...
> >
> > I'm building this system for my son (college student)  <snip >...
> > </snip> ...................  how to make the cd-rw & cd-rom devices
> > usable without requiring him to start a root shell and mount/umount these
> > devices.

> > 1) Should I automount cd's?
>
> Depends what you mean by auto-mount

Good point... I guess what I'd really meant is automount in the Windoze sense 
of the word; i.e. if I put a music cd in I can play music, if I put a data cd 
in I can read the files. I (regular joe user) don't have to su, or sudo to 
mount the device, and if I put a music cd in I don't cause a panic by trying 
to mount the device as a file system. In short, I want an automount that can 
figure out whether I've got a music cd or a file system, and "do the right 
thing".

> > 2) What is the "best way" to allow ordinary users to mount cd's?
>
> The best way is inevitably a matter of opinion.
> But it can be done without installing any additional ports.

I found a fairly complete (although slightly dated) recipe for using the amd 
and sysctl functions to handle automounting for regular users at this URL:

http://www.daemonnews.org/200202/automounting.html

But there are two things that concern me:
1) once the file system cd is mounted, a fixed amount of "no activity" time 
must pass before it is umount'd
2) security implications ?!!

Item 1) is a concern mostly 'cause it's just kind of kludge ("oh yeah, I have 
to wait for 60 seconds before I can eject my data cd"). Item 2) is a concern 
'cause college campuses are the most hostile network environments I've ever 
seen.

I don't mean to sound critical (really)... maybe there's just no good way to 
do this in FreeBSD. If that's the case, maybe WinXP is the best route for the 
"average user".

Thanks,
Jay



More information about the freebsd-questions mailing list