I want to disable usb devices based on vendor id in Linux environment. I want to allow only specific USB devices, based on vendor id.
Linux – how to disable USB devices based on vendor id in Linux environment
linuxudevusb
linuxudevusb
I want to disable usb devices based on vendor id in Linux environment. I want to allow only specific USB devices, based on vendor id.
Best Answer
You can make a udev rule that disables devices by default, but enables certain ones by vendor ID. Make a file
/etc/udev/rules.d/01-usblockdown.rules
that contains a rule to disable devices:And then rules to enable the devices you want to allow (you can use
ATTR{idVendor}
to get at the vendor ID):See "Locking down Linux using UDEV" for more information.