I have configured
auth sufficient pam_u2f.so cue [cue_prompt=Tap the Yubikey to sudo]
in /etc/pam.d/sudo to be able to sudo by touching my YubiKey. When running a script it might be easy to miss the LED indicator on key, so I configured cue and cue_prompt to print some equivalent to [sudo] Password for user: when using the password.
There's no cue printed ever, it behaves like the two options have not been configured. The options are correct according to https://developers.yubico.com/pam-u2f/. The docs don't say which version they belong to - that'd just be too easy - so maybe there's a mismatch that they're no longer or not yet supported.
I'm using libpam-u2f 1.1.0-1.1build1 on Ubuntu 23.10.
cueandcue_promptworks for me without having to manually press the Enter key. Note that I am using version 1.3.0-1 oflibpam-u2fon Ubuntu 24.04, so perhaps there was a bug in an earlier version (although I did not see anything along those lines in the release notes). Not sure if Ubuntu 23.10 is a hard requirement for you. If so, see if you can manually install a later release. – TenicioBelDoro Nov 27 '24 at 21:36