???????????
???????????????USB?豸????Ubuntu?????????????????????Windows???????????\192.168.1.10?????????????????????д??????????????????????????????????????????????????????????????????????????????????????????????????????????????????????в???USB?豸???????????????????????????????????
?????????????????????Ubuntu14.04??????????ù???????????????????磺???????????5??USB?豸??USB1~5???γ????豸????????????????????FAT32/NTFS/exFAT??????????2????????????????????????????????...
???????????
????1??????USB?豸??????????udev????
????2??????????SMBЭ?鹲????????????????ж??????Samba????????
???????????
??????? udev ??Ч?????????? Linux ?豸???
??????udev???????usb?豸
????CentOS 6.3??Samba????????????????
????????????
?????????Ubuntu 14.04??Samba?????????????????????????SELinux????????δ?????????????а??????????á???
????1?????exFat???????exFAT??????????
????root@Ubuntu1:~# sudo apt-get install exfat-utils
????2??????udev???????USB?豸???????
root@Ubuntu1:~# cd /etc/udev/rules.d/                          #udev??????
root@Ubuntu1:/etc/udev/rules.d# vim 70-persistent-net.rules    #?????????
KERNEL!="sdb?"?? GOTO="automount_exit"
ACTION=="add"?? SUBSYSTEM=="block"?? RUN+="/bin/mkdir /media/usb1"?? RUN+="/bin/mount -o uid=1000??user??codepage=936??utf8 $root/%k /media/usb1"
ACTION=="remove"?? SUBSYSTEM=="block"?? RUN+="/bin/umount /media/usb1"?? RUN+="/bin/rmdir /media/usb1"
LABEL="automount_exit"
#?????sdb???豸????д?????????????豸?????ж????????
KERNEL!="sdc?"?? GOTO="automount_exit"
ACTION=="add"?? SUBSYSTEM=="block"?? RUN+="/bin/mkdir /media/usb2"?? RUN+="/bin/mount -o uid=1000??user??codepage=936??utf8 $root/%k /media/usb2"
ACTION=="remove"?? SUBSYSTEM=="block"?? RUN+="/bin/umount /media/usb2"?? RUN+="/bin/rmdir /media/usb2"
LABEL="automount_exit"
KERNEL!="sdd?"?? GOTO="automount_exit"
ACTION=="add"?? SUBSYSTEM=="block"?? RUN+="/bin/mkdir /media/usb3"?? RUN+="/bin/mount -o uid=1000??user??codepage=936??utf8 $root/%k /media/usb3"
ACTION=="remove"?? SUBSYSTEM=="block"?? RUN+="/bin/umount /media/usb3"?? RUN+="/bin/rmdir /media/usb3"
LABEL="automount_exit"
KERNEL!="sde?"?? GOTO="automount_exit"
ACTION=="add"?? SUBSYSTEM=="block"?? RUN+="/bin/mkdir /media/usb4"?? RUN+="/bin/mount -o uid=1000??user??codepage=936??utf8 $root/%k /media/usb4"
ACTION=="remove"?? SUBSYSTEM=="block"?? RUN+="/bin/umount /media/usb4"?? RUN+="/bin/rmdir /media/usb4"
LABEL="automount_exit"
KERNEL!="sdf?"?? GOTO="automount_exit"
ACTION=="add"?? SUBSYSTEM=="block"?? RUN+="/bin/mkdir /media/usb5"?? RUN+="/bin/mount -o uid=1000??user??codepage=936??utf8 $root/%k /media/usb5"
ACTION=="remove"?? SUBSYSTEM=="block"?? RUN+="/bin/umount /media/usb5"?? RUN+="/bin/rmdir /media/usb5"
LABEL="automount_exit"
root@Ubuntu1:/etc/udev/rules.d# shutdown -r now    #??????
????3?????Samba???????????
????root@Ubuntu1:~# apt-get install samba samba-common