Advertisement
Guest User

Untitled

a guest
Nov 26th, 2014
182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. [root@black rules.d]# cat 01-usblockdown.rules
  2. ACTION=="add", SUBSYSTEMS=="usb", RUN+="/bin/sh -c 'for host in /sys/bus/usb/devices/usb*; do echo 0 > $host/authorized_default; done'"
  3. ACTION=="add", ATTR{idVendor}=="VENDORME", ATTR{idProduct}=="PRODUCTME", RUN+="/bin/sh -c 'echo 1 >/sys$DEVPATH/authorized'"
  4.  
  5. You can use lsusb to find the appropriate vendor and product ids.
  6.  
  7. 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