Tuesday, 26 February 2019

usb block fedora 29

To block USB in Linux 


touch /etc/modprobe.d/disable-usb-storage.conf

echo "install usb_storage /bin/true" >> /etc/modprobe.d/disable-usb-storage.conf


to check usb is attach, if attache it remove

lsmod | grep -i usb_storage


now (after remove usb)

modprobe -r usb_storage;


To reenable usb

rm /etc/modprobe.d/disable-usb-storage.conf


No comments:

Post a Comment