0

I want to disable a particular USB storage device (a sandisk flash drive). I read somewhere that you can use the .config file. How do i use it to disable that?

akshay
  • 279

3 Answers3

1

First :

You can disable it from Bios setting and make bios password protected .

Second:

You can get rid of all USB devices by disabling kernel support for USB via GRUB.

kernel /vmlinuz-2.6.18-128.1.1.el5 ro root=LABEL=/ console=tty0 console=ttyS1,19200n8 nousb
nux
  • 39,152
0

The best way is to use udev blacklisting (using the authorized feature in sysfs) so you can be very selective (since you want a specific device). You can find a very interesting article about this here

With .config you could totally disable usbstorage module but this would then make any usb storage not work anymore.

fede.evol
  • 121
0

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.

To enable again simply remove the line from the blacklist file.

Maythux
  • 87,123