Yubico Key Setup SUDO Password-less Auth
Following Yubico Key Setup, if you looking to setup Yubico Key to allow to do SUDO password-less Auth’s, follow the steps bellow
- Install Yubico PAM tools, this will enable you to use the Key for auth’s
$ sudo dnf install pam-u2f
$ # create a dir in your home in order to use it Yubico configuration store
$ mkdir -p ~/.config/Yubico
$ # register the Yubico Key
$ pamu2fcfg > ~/.config/Yubico/u2f_keys
- Configure you PAM for SUDO
$ # Edit /etc/pam.d/sudo and add the following to the first line
$ # auth sufficient pam_u2f.so
$ sudo vim /etc/pam.d/sudo
...
$ head -n1 /etc/pam.d/sudo
auth sufficient pam_u2f.so
- To the same step for the Polkit to allow GUI to follow the same process of ath
$ # Edit /etc/pam.d/polkit-1 and add the following to the first line
$ # auth sufficient pam_u2f.so
$ sudo vim /etc/pam.d/polkit-1
...
$ head -n1 /etc/pam.d/polkit-1
auth sufficient pam_u2f.so
- Restart your system
sudo reboot
All done, enjoy!