Доброго времени суток комрады Linux.
Озадачился вопросом. Блокировки всех устройств USB кроме разрешенных. Чтобы сотрудники не подключали левые девайсы по USB.
Делал по этой ссылки
Собственно версия ОС.
# uname -a
Linux TEST 3.0.101-68.4-desktop #1 SMP PREEMPT Tue Dec 1 17:21:37 CET 2015 (ed01a9f) x86_64 x86_64 x86_64 GNU/Linux
# Skeep not USB
SUBSYSTEM!="usb", GOTO="usb_end"
# Skeep remove actions
ACTION=="remove", GOTO="usb_end"
#Usb-Intel-HUB
SUBSYSTEMS=="usb", ACTION=="add", ATTR{idVendor}=="8087", ATTR{authorized}="1", GOTO="usb_end"
#Usb-HUB1
SUBSYSTEMS=="usb", ACTION=="add", ATTR{idVendor}=="1d6b", ATTR{authorized}="1", GOTO="usb_end"
#Microsystems-HUB
SUBSYSTEMS=="usb", ACTION=="add", ATTR{idVendor}=="0424", ATTR{authorized}="1", GOTO="usb_end"
#Usb-Hasp-Key
SUBSYSTEMS=="usb", ACTION=="add", ATTR{idVendor}=="1111", ATTR{authorized}="1", GOTO="usb_end"
#Keyboard
SUBSYSTEMS=="usb", ACTION=="add", ATTR{idVendor}=="046d", ATTR{authorized}="1", GOTO="usb_end"
#Mouse
SUBSYSTEMS=="usb", ACTION=="add", ATTR{idVendor}=="045e", ATTR{authorized}="1", GOTO="usb_end"
#Flash
SUBSYSTEMS=="usb", ACTION=="add", ATTRS{serial}=="55555", ATTR{authorized}="1", GOTO="usb_end"
# Disable all other USB devices
SUBSYSTEMS=="usb", ACTION=="add", ATTR{authorized}="0"
LABEL="usb_end"
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 1111:0001 Aladdin Knowledge Systems HASP copy protection dongle
Bus 001 Device 003: ID 0424:2514 Standard Microsystems Corp. USB 2.0 Hub
Bus 003 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 004 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 004: ID 046d:c31c Logitech, Inc. Keyboard K120
Bus 001 Device 005: ID 045e:0797 Microsoft Corp. Optical Mouse 200
Bus 001 Device 006: ID 5555:161a Kingston Technology Dell HyperVisor internal flash drive
ATTRS{idProduct}
/sys/bus/usb/devices
ls /sys/bus/usb/devices/ |grep -v ':'
1-3
1-4
1-4.1
1-4.2
1-4.4
3-1
4-1
usb1
usb2
usb3
usb4
udevadm info -a -p /sys/block/sdc