How to disable fingerprint request for sudo command on Fedora Linux 35?

Continuing the discussion from How to disable fingerprint request for sudo command?:

The above solution for Fedora-33 does not work for Fedora-35.

Do we have an updated solution?

2 Likes

Hi, from /etc/pam.d we get some symlink file:

fingerprint-auth
password-auth
postlogin
smartcard-auth
system-auth

All those file pointing to /etc/authselect/ directory.

If we open file /etc/pam.d/sudo, it will give:

#%PAM-1.0
auth       include      system-auth
account    include      system-auth
password   include      system-auth
session    optional     pam_keyinit.so revoke
session    required     pam_limits.so
session    include      system-auth

Change it to:

#%PAM-1.0
auth       include      password-auth
account    include      password-auth
password   include      password-auth
session    optional     pam_keyinit.so revoke
session    required     pam_limits.so
session    include      password-auth

Reason:

If we compare /etc/authselect/system-auth and /etc/authselect/password-auth, it will give:

[testcase@fedora authselect]$ diff password-auth system-auth 
5a6
> auth        sufficient                                   pam_fprintd.so

Means if we choose password-auth it will not use pam_fprintd.so.

2 Likes

I have done this change, reboot.
Open terminal, sudo su still prompts for fingerprint.

If using su, please check with /etc/pam.d/su and change accordingly.

Btw, I just typing su if want to switch to root account and no need sudo in my system.

1 Like

The solution provided by @oprizal, that is a simplified and more clean version provided in the other post, works for me.
At this point I would look at logs and other issues in your system.

1 Like

If you have disabled the root account, su does not work. sudo su does.

1 Like

sudo -i
sudo -s

Are other alternatives.

You’re right. I forgot about this. Maybe I add root account during chroot or other events when I can’t boot to my Fedora Workstation.

1 Like

I’ve updated the two topics now with better topic titles. Please remember to think of what the best title for your topic is, to ensure that others looking for information on the forum can also find it quickly. A topic like “this solution does not work on f35” is far too generic :slight_smile: