Google Site SearchFN Site Search FN Blog Login FN Blog Login
Site Navigation:
 
 

Fedora Tips

by Krishnan Subramanian

2004-01-27 Fedora Tips 30:
This is a followup to Tip 28. It could be usefull to automount the usb drive without need of manually mount it. Fot that, just do the following :

add this line into "/etc/auto.master" :

/misc           /etc/auto.misc          --timeout=60
add this line into "/etc/auto.misc" ('99' stand for user 'nobody' on my system) :
usb   -fstype=auto,nosuid,nodev,sync,dirsync,mode=777,uid=99,gid=99,umask=000   :/dev/sda1
make sure the "/misc" directory exists :
# mkdir -p /misc
start/restart autofs :
# chkconfig --level 345 autofs on
# service autofs restart
That is. USB drives will be mounted/unmounted automagically for all users.

Security problem : as autofs do its job as user "root", we must mount the drive as nobody and allow all users to read/write on it. - submitted by Philippe Froidevaux

Also note that you may want to add the noatime parameter as well, since it extends the life of the key by not writing to it with every read access. - submitted by Hennie Strydom