I've successfully added 2FA with Google Authenticator package on openSUSE Leap 42.1 for Display Manager,
su. I have to enter a verification code from Android app every time I use these tools (both for my main user and root).
However, when I e.g. try to install software via GUI with Yast2 there's no field to enter the code. I enter my root password and Yast's window freezes (probably waiting for the code). The reason is that Yast2 uses
su. So when I comment out the line with Google Authenticator in
/etc/pam.d/su I can open Yast and install software, change system settings, etc.
How can I make Yast2 ask me for verification codes?