Use a fingerprint sensor on a ThinkPad with Ubuntu
Dead simple. Everything is already installed on Ubuntu from 20.04 upwards. Just call fprintd-enroll and let it read your finger (by default, it is the right index finger[1]):
$ fprintd-enroll Using device /net/reactivated/Fprint/Device/0 Enrolling right-index-finger finger. Enroll result: enroll-stage-passed Enroll result: enroll-stage-passed Enroll result: enroll-stage-passed Enroll result: enroll-stage-passed Enroll result: enroll-stage-passed Enroll result: enroll-stage-passed Enroll result: enroll-stage-passed Enroll result: enroll-completed
This will say enroll-stage-passed several times. Wait for the final enroll-completed to make sure that your finger was scanned correctly and thoroughly.
That’s it. Now you have your fingerprint stored. Check with[2]:
$ fprintd-list nik found 1 devices Device at /net/reactivated/Fprint/Device/0 Using device /net/reactivated/Fprint/Device/0 Fingerprints for user nik on Synaptics Sensors (press): - #0: right-index-finger
From now on, the login screen says you can also use a fingerprint to unlock and in fact, you can.
Here’s more documentation: https://askubuntu.com/questions/511876/how-do-i-install-a-fingerprint-reader-on-lenovo-thinkpad.
For me, scanning did not work in all cases (for example, I have the suspicion that the finger is not scanned correctly when the skin is very dry), so I think it’s a good idea to scan more than one finger.