Hello. Thank you @terrapin for writing this out. I am in the same basket as you are/were. But something was a bit strange, since when I ran sudo
, it was asking me for root
password, and not password for my user.
It seems like Tumbleweed by default has some extra lines in sudoers
file:
## In the default (unconfigured) configuration, sudo asks for the root password.
## This allows use of an ordinary user account for administration of a freshly
## installed system.
Defaults targetpw # ask for the password of the target user i.e. root
ALL ALL=(ALL) ALL # WARNING! Only use this together with 'Defaults targetpw'!
##
## Runas alias specification
##
These defaults are always asking for root password AFAIK. In other to fix the duplicate fingerprint problem, we need to tell system that fingerprint (and password) from current user can be used.
First, make sure your user is in wheel
group. Run:
groups
If you are not in wheel
, add yourself:
sudo usermod -a -G wheel REPLACE_WITH_YOUR_USERNAME
Next, use visudo
and comment out these defaults, and uncomment line for wheel
group. To edit file run:
sudo visudo
Your file should look something like this:
...
# In the default (unconfigured) configuration, sudo asks for the root password.
## This allows use of an ordinary user account for administration of a freshly
## installed system.
#Defaults targetpw # ask for the password of the target user i.e. root
#ALL ALL=(ALL) ALL # WARNING! Only use this together with 'Defaults targetpw'!
##
## Runas alias specification
##
##
## User privilege specification
##
root ALL=(ALL:ALL) ALL
## Uncomment to allow members of group wheel to execute any command
%wheel ALL=(ALL:ALL) ALL # UNCOMMENT THIS LINE
## Same thing without a password
# %wheel ALL=(ALL:ALL) NOPASSWD: ALL
## Read drop-in files from /usr/etc/sudoers.d
@includedir /usr/etc/sudoers.d
@includedir /etc/sudoers.d
After saving file (esc-:wq-enter), sudo should now ask you for your fingerprint and/or password, if you are in wheel
group.
Bonus info:
If you want system to ask you for fingerprint first, and then password, just swap first two lines from previous post in /etc/pam.d/sudo
:
#%PAM-1.0
auth sufficient pam_fprintd.so
auth sufficient pam_unix.so try_first_pass likeauth nullok
auth include common-auth
...
Cheers!