Blocking Mass Storage in Linux

Disabling Mass Storage in Linux-Based Distros

  1. Unmount the USB device if it is currently connected:
    [root@centos ~]# umount /dev/sdb

    Note: The device name may vary in your case.

  2. Remove the USB storage module:
    [root@centos ~]# modprobe -r usb_storage
  3. Edit /etc/modprobe.d/blacklist.conf and add the following line:
    blacklist usb_storage

    Save the file.

Now, when a USB flash drive is connected, the hotplug scripts will not load it automatically.

Comments

Popular posts from this blog

Server should be SSL-aware but has no certificate configured [Hint: SSLCertificateFile] ((null):0)

Using a Self signed Certificate to Run Apache2 under SSL

IPS (Image Packaging system) in Solaris 10