udev: lock screen on HID connection
This prevents hardware attacks where a USB device disguises as a keyboard and types malicious commands by locking the screen before enabling any human interface device once connected.
This commit is contained in:
parent
ead87aaab8
commit
62486926f6
3
udev/lock-screen-on-hid-connection.sh
Executable file
3
udev/lock-screen-on-hid-connection.sh
Executable file
@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
echo 'SUBSYSTEM=="usb", DRIVER=="usbhid", RUN+="/usr/bin/loginctl lock-sessions"' | sudo tee /etc/udev/rules.d/00-usbhid-lock-screen.rules
|
||||
sudo systemctl reload udev
|
Loading…
Reference in New Issue
Block a user