howto: user mount external media

This have been asked so many times, that I decided to write howto

to /etc/sysctl.conf add
Code:
vfs.usermount=1

to /etc/devfs.conf add
Code:
perm    acd0    0660
own     acd0    root:operator

perm    cd0     0660
own     cd0     root:operator

to /etc/devfs.rules add
Code:
[localrules=10]
add path 'da*' mode 0660 group operator
add path 'md*' mode 0660 group operator
NOTE: I added md* to let users mount virtual images (mdconfig(8))

to /etc/rc.conf add
Code:
devfs_system_ruleset="localrules"

And now make ~/mnt/ for every user

Now after restart users in operator group will be able to mount external media to ~/mnt/ like this:
For UFS formated flash:
$ mount -t ufs /dev/da0 ~/mnt
For CD:
$ mount -t cd9660 /dev/acd0 ~/mnt


Related posts:
http://forums.freebsd.org/showthread.php?t=20159 - Automount
 
Back
Top