For security reasons, many businesses are completely disabling USB storage devices on the computers at work. Particularly if you are like me and work with healthcare information, it's doubly important that not only no one can bring in a virus, but that they also can't leave with any private information.
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:
sudo echo "blacklist usb-storage" >> /etc/modprobe.d/blacklist.conf
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.
I'll be giving more enterprise Linux tips in the near future if all goes well.

That is nice but then also
That is nice but then also tell how to re enable it
Remove the line from the
Remove the line from the blacklist file using nano or vi?
Nice trick
Nice trick, thanks, and I would like to know how to enable the usb storage, thanks
Re-enabling USB
Your tip for disabling was easy and elegant. one line typed at the root terminal and its gone. would it be possible to provide something equally easy to re-enable? Or if not, then provide step-by-step instructions for how to bring it back? i'm trying to administer a group of netbooks for teachers in a school. they trusted me to put linux on. i am new to this but know linux is right. i need a way to back out individual users on an "as needed" basis if this becomes necessary. thanks!
Reverse what you did? Edit
Reverse what you did? Edit the /etc/modprobe.d/blacklist.conf file and remove the line that says "blacklist usb-storage". Then reboot.
Post new comment