Blocking Mass Storage in Linux
Disabling Mass Storage in Linux-Based Distros
- Unmount the USB device if it is currently connected:
[root@centos ~]# umount /dev/sdb
Note: The device name may vary in your case.
- Remove the USB storage module:
[root@centos ~]# modprobe -r usb_storage
- 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
Post a Comment