Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [root@black rules.d]# cat 01-usblockdown.rules
- ACTION=="add", SUBSYSTEMS=="usb", RUN+="/bin/sh -c 'for host in /sys/bus/usb/devices/usb*; do echo 0 > $host/authorized_default; done'"
- ACTION=="add", ATTR{idVendor}=="VENDORME", ATTR{idProduct}=="PRODUCTME", RUN+="/bin/sh -c 'echo 1 >/sys$DEVPATH/authorized'"
- You can use lsusb to find the appropriate vendor and product ids.
- What the above rule does is block everything, then allow specific devices - you can add as many as you like.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement