I'm trying to set up a linux development environment that is both secure and convenient, and after setting up passwordless login and 2-factor authenticated pam_u2f, I had the idea to create different user accounts with different authentication requirements.
in the configuration files located at /etc/pam.d/, authentication methods tend to be user/group agnostic, for example:
auth required pam_u2f.so authfile=/etc/my_yubikeys cue
can you specify users or groups so that, for example an admin account or members of the group wheel requires 2 factors to login(password and something else), while other users require one?
authfilestored in a user agnostic location, most often yubikey (setups) have the authfile stored at user level(same with google authenticator), so pam already has the ability to check user level stuff before the user has been fully authenticated.