Sunday, December 14, 2014

How to disable USB or Pendrive In linux

How to  Disable USB Devices:
The USB storage drive automatically detects USB flash or hard drives. You can easily force and disable USB storage devices under any Linux distribution. The modprobe program used for automatic kernel module loading and can be configured to not load the USB storage driver upon demand. This will prevent the modprobe program from loading the usb-storage module, but will not prevent root (or another program) from using the insmod program to load the module manually.
many method is available for disable USB :

Method 1:

run the following command:
              # echo 'install usb-storage : ' >> /etc/modprobe.conf

Method 2 :
You can get rid of all USB devices by disabling kernel support for USB via GRUB. Open grub.conf and append "nousb" to the kernel line as follows:
               # vim /etc/grub.conf
kernel /vmlinuz-2.6.18-128.1.1.el5 ro root=LABEL=/ console=tty0 console=ttyS1,19200n8 nousb

No comments:

Post a Comment