Last active
January 29, 2021 17:11
-
-
Save ju916/8f1267b43edfbd7be5127eb24045546f to your computer and use it in GitHub Desktop.
Udev Yubikey rules
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# handcrafted file to trigger events on | |
# removal/insertion of Yubico U2F-Tokens | |
# place in /etc/udev/rules.d | |
# Key inserted | |
ACTION=="add", SUBSYSTEM=="hid", ENV{HID_NAME}=="Yubico Security Key by Yubico", RUN+="/usr/local/bin/device_inserted.sh" | |
# Key removed | |
ACTION=="remove", SUBSYSTEM=="hid", ENV{HID_NAME}=="Yubico Security Key by Yubico", RUN+="/usr/local/bin/device_removed.sh" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Eine Alternative zum Matching auf HID_NAME könnte noch ein partielles Matching auf HID_ID mit der VendorId
1050
darstellen:ACTION=="remove", SUBSYSTEM=="hid", ENV{HID_ID}="*:00001050:*", RUN+="/usr/local/bin/device_removed.sh"
Das funktioniert mit meinen Yubikeys und sollte auch mit dem U2F-Key so gehen.