Sunday, March 29, 2009

How to block USB Storage Devices

(System used here is a Cent OS 5.2 system with kernel 2.6.18-92.el5)

To block USB Storage devices on your system do the following:

1. Most Linux distros have a module called usb-storage.

2. On my system I located it to


3. Open the /etc/modprobe.d/blacklist and add the entry

blacklist usb-storage

4. Restart the machine.

5. Usb storage devices will be blocked upon restarting the machine.

6. If you still face issues enter the following line at the bottom of the /etc/modprobe.conf file.

install usb-storage /bin/true

The above method can be used to block any module from loading in an OS

No comments: