Enable FingerPrint Login in Ubuntu
Login in Ubuntu with a Fingerprint sensor is possible and this blog post is all about that. I am going to explain the whole procedure of How to Enable Fingerprint Login in Ubuntu but before that, please read the below disclaimer first.
Disclaimer
This method is working absolutely fine. You just need to read this blog very carefully and try to execute the exact commands.
This tutorial is for this driver âž¡ Elan Microelectronics Corp. ELAN:Fingerprint, specifically the 0c4f device Id.
To check that, open a terminal and type lsusb and it will list the USB devices. Check the below image for references.

The Plan
The plan is we will uninstall the fprintd and libfprint packages and then, we’ll install it with some modifications. Then, we will add or register our fingerprints. And Then, we will add our fingerprint authentication to the PAM modules.
Uninstalling fprintd and libfprint
Just open a terminal by pressing Ctrl + Alt + t and run the below commands. It will ask for the password, enter the password and go ahead.
sudo apt purge --auto-remove fprintd libfprint-2-2
And, it will uninstall the fprintd and libfprint packages. Now, it’s time for installation.
Installing Everything, for Fingerprint Sensor 😉
First, we have to install git, and then we will clone two repo.
sudo apt install git
Now, just copy the commands and paste them on the terminal one by one and relax.
git clone https://gitlab.freedesktop.org/libfprint/fprintd.git
cd fprintd && git checkout 1.90.1 && cd ..
git clone https://gitlab.freedesktop.org/libfprint/libfprint.git
cd libfprint && git checkout v1.90.5 && cd ..
Now, we have to add the device id to the header file of elan drivers. So, here you go,
sudo gedit libfprint/libfprint/drivers/elan.h
And now, look for the line, which says {.vid = 0, .pid = 0, .driver_data = 0},
and insert the below line just above it.
{.vid = ELAN_VEND_ID, .pid = 0x0c4f, .driver_data = ELAN_ALL_DEV},
and then Save and Close.
Now firstly we will install gtk-doc-tools and then the rest of the part.
sudo apt-get install gtk-doc-tools
Now, run the below commands in a single run i.e. just copy and paste it and then hit enter.
sudo apt install build-essential cmake gettext libdbus-1-dev libdbus-glib-1-dev libdebconfclient0 libgirepository1.0-dev libglib2.0-dev libgusb-dev libnss3-dev libpam-wrapper libpam0g-dev libpixman-1-dev libpolkit-gobject-1-dev libsystemd-dev meson python3-dbusmock python3-pip python3-pypamtest
Build and install the library and daemon
execute them one by one.
meson libfprint libfprint/_build
sudo ninja -C libfprint/_build install
meson fprintd fprintd/_build
sudo ninja -C fprintd/_build install
PAM Authentication
Here is the main part, you have to enable this, and then only you will be able to enroll your fingerprints. Take a look at the below image for references. In the terminal type, the below command hits the enter, and then the PAM window will open.
sudo pam-auth-update

You need to press the “Space” key to select the option âž¡ Fingerprint authentication.
Select the Fingerprint authentication option as described above and click on “Ok”.
Reboot
Now, it is very important to reboot the system to see all the changes. For that, just type in the terminal,
sudo reboot
Adding Fingerprints
Let’s add our fingerprints now. Open “Settings” and scroll down to the “Users” section.

As you can see my details 😛 as well as the Fingerprint Login option here.
Click on the Fingerprint Login option and then click on “Scan new fingerprint”.

You have to select the finger type, let’s take Left Index Finger.

You have to swipe your finger from up to down, like a scroll down.
Click on Done and you’re good to go. Reboot your system to taste the fingerprint login experience.
Remember
Unlike Windows, it does not detect the fingerprint with only one touch. You have to slide it downwards. If you try to just touch it while registering, then the sensor might freeze. Then you have to perform a reboot and everything will be working fine.
Fingerprint Login in Ubuntu

Here is a short glimpse of the Fingerprint Login in Ubuntu
Alternatives to “Sudo”

You can use the fingerprint for any kind of system authentication
This is how you have to enable the fingerprint login in ubuntu. To learn more about Linux, subscribe and find all the Linux posts here.
If you face any difficulties while reading this blog, please let me know, I will be happy to help you out.
In PAM authentication i can not find fingerprint reader but in settings/user shows fingerprint options but in disabled form and after some that option got vanished from setting
Hey Alok, thanks for the comment. The option is there in disabled form, so you have to click on that to enable it.
but on my fingerprint option clicking is not working. and it is not even showing fingerprint disabled
it just show fingerprint disable/enable not even there
I am also facing same issue
Exact same issue, I followed precisely the instructions but the “Fingerprint authentication” does not appear in the PAM settings.
What is your driver for Fingerprint?
Hi guys! Same problem.
What is your driver for Fingerprint?
I have the same issue. Did we just make it worse?
same issue
driver is same as mentioned in the article
I don’t know why the problem is occurring, maybe any of the packages is no more active. So for the inconvenience.
I am not able to see fingerprint option in settings>user even after following all the steps what to do
I build fprint at v1.90.9 with error “fprintd/meson.build:148:8: ERROR: Problem encountered: Python3 module ‘gi.repository.FPrint’ required by test suite not found”
How to fix this error
Hi I had a problem with the cairo package. It said : ImportError: No module named ‘cairo’ even after installing it. This can be solved by installing cairocffi.
In ubuntu :
sudo apt-get install python3-cairocffi
Hope this helps some people with the same issue!
i think this tutorial only works for your specific elan sensor. I think this is not clear from the post name because I followed it for a different sensor brand and of course it doesnt work
Yeah, it is only for Elan drivers.
Hi,
Thanks for the blog, I can’t see finger print option after doing those steps. but could be able to see before uninstall fprintd.
I’m using ubuntu 20.04
Could you please able to help to fix this ?
So, why did you uninstall that?
If you have ELAN drivers then only follow the whole steps, otherwise re-install fprintd as usual.
Hello guys. I have tried this tutorial and it hasn’t given any results. For 16.07.21 there’s simpler way:
sudo apt purge –auto-remove fprintd libfprint-2-2
sudo apt install fprintd
sudo apt reboot
And now everything is working fine