Skip to content

Instantly share code, notes, and snippets.

@palkx
Last active December 21, 2020 14:10
Show Gist options
  • Save palkx/c12937fc5518f8f8faff5c7243528403 to your computer and use it in GitHub Desktop.
Save palkx/c12937fc5518f8f8faff5c7243528403 to your computer and use it in GitHub Desktop.
This script will install all necessary stuff to activate yubikey working without sudo on fresh manjaro installation
#!/bin/bash
sudo echo "# this udev file should be used with udev 188 and newer
ACTION!=\"add|change\", GOTO=\"u2f_end\"
KERNEL==\"hidraw*\", SUBSYSTEM==\"hidraw\", ATTRS{idVendor}==\"1050\", ATTRS{idProduct}==\"0113|0114|0115|0116|0120|0402|0403|0406|0407|0410\", TAG+=\"uaccess\"
LABEL=\"u2f_end\"" > /etc/udev/rules.d/70-u2f.rules
sudo pacman -S libusb-compat pcsclite ccid
sudo systemctl enable pcscd.socket
sudo udevadm control --reload
sudo systemctl start pcscd.socket
echo "enable-ssh-support" >> ~/.gnupg/gpg-agent.conf
echo "export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)" >> ~/.bashrc
echo "gpgconf --launch gpg-agent" >> ~/.bashrc
source ~/.bashrc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment