allow normal user mount device at freebsd

allow normal user mount at freebsd is posible, with a litte modification on sysctl.conf normal user can mount cdrom,  or dvdrom at freebsd. see step by step to allow normal user can mount media below:

#sysctl -w vfs.usermount=1 or you can edit sysctl.conf and find vfs.usermount=1

find device name at your freebsd box

#camcontrol devlist or
# egrep 'ad[0-9]|cd[0-9]' /var/run/dmesg.boot

update /etc/devfs.conf this use for add device owner and permission for example we have  dvdrom and that device can be mount for the normal user in this case we call dvdrom with cd0

#ee /etc.devfs.conf
# allow member of operator to mount cdrom
own       /dev/cd0       root:operator
perm      /dev/cd0       0660

save and exit from the editor and put add user can be mount dvdrom with the group operator

# pw groupmod operator -m peyank

and try to login with the following user and write the command below

#mkdir ~/cdrom
#mount_cd9660 /dev/cd0 ~/cdrom
#mount

for unmount the divice just write the following command below

#unmount ~/cdrom

Related content:

  1. basic linux command

Speak Your Mind

*