I'm using Ubuntu 12.04 and I want to block usb storage on it. What is the correct way to do this?
In Linux the risk of viruses are small to nonexistent, however USB sticks automatically mount for reading and writing regardless. There's an easy way in recent Ubuntu distributions to disable USB storage devices. Simply blacklist the kernel driver:
Then update the initramfs
After that, nobody can use a USB memory stick in that computer, but still allows the administrator(s) to manually load the module and use it.
source is here: http://www.ossramblings.com/disabling_usb_storage_in_linux
Another way which is more selective is to note that users who are members of the plugdev group are allowed to access pluggable storage devices so you could just remove any users you don't want to use USB sticks from that group.
change the kernel ver in
The simple way Login as root open terminal and type the following command
then add the blacklist usb_storage at the last line as follows
Save it and reboot your system.