How to disable fingerprint request for sudo command?

I’ve got fresh installed Fedora 33 on Thinkpad T14s.

I’ve set up fingerprint login. And now it’s asking for fingerprint event on sudo command.

It becomes unusable in case of closed lid. Is there a way to left fingerprint only for system login?

2 Likes

Hi,

This would suggest:

That sudo authselect disable-feature with-fingerprint

Should should do the trick.

Thanks Tom.

2 Likes

Hi, Tom. Thanks for quick response.
Unfortunately, It disables fingerprint totally.

Is there any way to set it in such way:
Allow login with password/fingerprint (as it works out of the box), but not to ask for a fingerprint in terminal?

1 Like

How is your terminal configured? You may check settings and see if under title and command the option “run command as a login shell” is activated. Maybe deactivating helps ?!

I also want to know how to do this.

Current I bypass this issue by editing sudo setting with visudo such that when I am doing sudo, no password is asked.

I’m not pretty sure, but PAM is involved.

The file /etc/pam.d/sudo includes /etc/pam.d/system-auth

In /etc/pam.d/system-auth there is this line
auth sufficient pam_fprintd.so

So, probably
sudo cp /etc/pam.d/system-auth /etc/pam.d/system-auth-nofingerprint
In this file (system-auth-nofingerprint), remove/comment the line containing pam_fprintd.so

Then
sudo cp /etc/pam.d/sudo /etc/pam.d/sudo.orig

And edit /etc/pam.d/sudo including the system-auth-nofingerprint file
Like this

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

Please pay attention.

6 Likes

This works for me.

First logon prompts for fingerprint scan, sudo prompts for password directly.

2 Likes

Thank you so much. I can confirm - this solution works great.
I near future I’m planing to try make acpid turn off the fingerprint if lid is closed and turn it on if it’s opened.

2 Likes

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.