Last active
December 17, 2015 17:19
-
-
Save bradfa/5645342 to your computer and use it in GitHub Desktop.
Yubico udev rule
This file contains 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
ACTION!="add|change", GOTO="yubico_end" | |
# Udev rules for letting the console user access the Yubikey USB | |
# device node, needed for challenge/response to work correctly. | |
# Yubico Yubikey II | |
ATTRS{idVendor}=="1050", ATTRS{idProduct}=="0010|0110|0111", \ | |
ENV{ID_SECURITY_TOKEN}="1", RUN+="/usr/bin/killall -9 scdaemon" | |
LABEL="yubico_end" |
This file contains 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
#!/bin/sh | |
envfile="${HOME}/.gnupg/gpg-agent.env" | |
if test -f "$envfile" && kill -0 $(grep GPG_AGENT_INFO "$envfile" | cut -d: -f 2) 2>/dev/null; then | |
eval "$(cat "$envfile")" | |
else | |
eval "$(gpg-agent --daemon --write-env-file "$envfile")" | |
fi | |
export GPG_AGENT_INFO # the env file does not contain the export statement |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment