Disable USB storage support in RHEL 5

To easily disable USB storage device support in RHEL 5 just add the following line to /etc/modprobe.conf:

install usb-storage :

This will prevent modprobe from loading the usb-storage module, but will allow administrators to manually load the module with insmod when needed.

If you will never need USB support you can simply remove the USB Storage driver from the kernel. Note: This will have to be repeated after each kernel update.

mv /lib/modules/kernelversion(s) 
        /kernel/drivers/usb/storage/usb-storage.ko /root

You could also append nousb to the kernel line in your /etc/grub.conf. Make sure that your /etc/grub.conf is password protected or someone could just edit the line from it in single user mode.

kernel /vmlinuz-version ro vga=ext 
        root=/dev/VolGroup00/LogVol00 rhgb quiet nousb

Leave a Reply

Your email address will not be published. Required fields are marked *