So, we're working to set up an environment here where we have a secure storage setup on our Linux laptops, such that our Linux laptops can only connect a specific USB drive: a Kingston DataTraveler 2.0. Vendor:Model code is this (from lsusb
): Bus 003 Device 003: ID 0951:1665 Kingston Technology
I've been trying to get these rules to work, but on a 12.04 environment the rules aren't working. (Note I've made comments with #
prepended lines, but they're not in the udev files):
# If a device is NOT a Kingston drive, ignore it.
SUBSYSTEMS=="usb", DRIVERS=="usb", ATTRS{idVendor}!="0951", OPTIONS+="ignore_device"
# If a device is a Kingston drive, but is NOT the model we have, ignore it.
SUBSYSTEMS=="usb", DRIVERS=="usb", ATTRS{idVendor}=="0951", ATTRS{idProduct}!="1665", OPTIONS+="ignore_device"
# If a device is a Kingston drive and is the model we have, then run a script
SUBSYSTEMS=="usb", DRIVERS=="usb", ATTRS{idVendor}=="0951", ATTRS{idProduct}=="1665", RUN+="/lib/udev/syslog-authorized-device-connected.sh"
The issue I have is that NONE of these rules are working, and I have no idea if this is even the correct approach for this.
Thoughts?
ATTRS{authorized}=0
in your first two. Another idea would be to use RUN to run some different scripts and just make sure the idVendor and idProduct detection is working as intended. – Seth May 22 '15 at 00:02