@w4tsn But in my case using udev rules and pam_yubico in sudo resulted in immediate lock anytime I used sudo :( but I really liked the idea and had already wondered how hard it would be to do so, udev was easy to try but it was unusable with my setup, so I digged around until I found a way that worked.