VFS 495 finger print reader not working in Ubuntu

I have HP Probook 450 and it has integrated finger print reader VFS 495 from Validity Inc. I have Linux drivers from the HP site. Now I want to make it work it in Ubuntu. The drivers are in rpm format so I used alien converter to convert it into deb package and then installed.

Link to HP driver page: Driver

FYI: This driver package has some fprint wrapper library contained and also has a file HPUsbVFS495.img, but I was unable to figure out, how it works.

Output of lspci && lsusb:

00:00.0 Host bridge: Intel Corporation 3rd Gen Core processor DRAM Controller (rev 09)
00:02.0 VGA compatible controller: Intel Corporation 3rd Gen Core processor Graphics Controller (rev 09)
00:14.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB xHCI Host Controller (rev 04)
00:16.0 Communication controller: Intel Corporation 7 Series/C210 Series Chipset Family MEI Controller #1 (rev 04)
00:1a.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #2 (rev 04)
00:1b.0 Audio device: Intel Corporation 7 Series/C210 Series Chipset Family High Definition Audio Controller (rev 04)
00:1c.0 PCI bridge: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 1 (rev c4)
00:1c.2 PCI bridge: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 3 (rev c4)
00:1c.3 PCI bridge: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 4 (rev c4)
00:1c.5 PCI bridge: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 6 (rev c4)
00:1d.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB Enhanced Host Controller #1 (rev 04)
00:1f.0 ISA bridge: Intel Corporation HM76 Express Chipset LPC Controller (rev 04)
00:1f.2 SATA controller: Intel Corporation 7 Series Chipset Family 6-port SATA Controller [AHCI mode] (rev 04)
02:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS5229 PCI Express Card Reader (rev 01)
03:00.0 Network controller: Ralink corp. RT3290 Wireless 802.11n 1T/1R PCIe
03:00.1 Bluetooth: Ralink corp. RT3290 Bluetooth
04:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 0c)
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 004: ID 04ca:7022 Lite-On Technology Corp. 
Bus 001 Device 003: ID 138a:003f Validity Sensors, Inc. 
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 002: ID 09da:c10a A4 Tech Co., Ltd 
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Solution 1:

I got it working on 16.04 on this machine following this guide but it had some problems with the links so here's exactly what I did...

(first you may want to navigate to an empty folder because we'll do some downloading & compilation & conversions. Files will be all over the place)

mkdir temporary
cd ./temporary

now we've created a folder and navigated to it we can proceed...

First, download this and place it in your empty folder.

The guide's very long but what's good about it is that it should work if you just follow it sequentially. If you don't understand what's happening just copy and paste the lines one after the other (or ask in a comment)

install the driver:

tar xf vfs495.tar
cd vfs495
sudo apt install alien
sudo alien Validity-Sensor-Setup-4.5-118.00.x86_64.rpm
sudo dpkg -i validity-sensor-setup_4.5-119_amd64.deb

Now the broken links part. Here are the links that should work:

sudo apt install libssl1.0.0
ln -s /lib/x86_64-linux-gnu/libssl.so.1.0.0 /lib/x86_64-linux-gnu/libssl.so.0.9.8
sudo apt-get install libcrypto++-dev
ln -s /usr/lib/libcrypto++.so.9 /usr/lib/libcrypto.so.0.9.8

Then just proceed. Install libfprint

mkdir libfprint
cd libfprint
rpm2cpio ../libfprint-0.0.6-18.20.1.src.rpm | cpio -i --make-directories
tar xf libfprint-0.0.6.tar.bz2
cp ../libfprint-validity.patch ./libfprint-validity.patch
cd libfprint-0.0.6/
patch -p1 < ../libfprint-validity.patch
sudo apt-get install libusb-dev libcrypto++-dev libssl-dev libglib2.0-dev libmagickcore-dev checkinstall
./configure --prefix=/usr
make
sudo checkinstall -install=no make install
sudo dpkg -i libfprint_0.0.6-1_amd64.deb

Install fprint_demo

cd ../..
sudo apt-get install libgtk2.0-dev
tar xf fprint_demo-0.4.tar.bz2
cd fprint_demo-0.4
./configure --prefix=/usr
make
sudo checkinstall -install=no make install
sudo dpkg -i fprint-demo_0.4-1_amd64.deb

At this point, we can start to register our fingers.

sudo /etc/init.d/vcsFPServiceDaemon start
sudo fprint_demo

...after you enroll your finger you can train in the "identify" tab. It'll display your fingerprint! It's so much fun :D sometimes I just go there and keep swiping XD

And just a side-note, don't take screenshots of your finger and share it around unless of course, you know what you're doing. Your fingerprint is valuable. Better keep it for your eyes only.

...anyway, continue. Install pam_fprint

cd ..
tar xf pam_fprint-0.2.tar.bz2
cd pam_fprint-0.2/
sudo apt-get install libpam-dev
./configure --prefix=/usr
make
sudo checkinstall -install=no make install
sudo dpkg -i pam-fprint_0.2-1_amd64.deb

Now we can start setting up fingerprint authentication. I recommend you stop here because I've been using it for a while and there are several issues with it. So far your driver is working and that's fine. You can try it for authentication and revert it if you want, but it's not robust for daily use.

Anyway, we need to edit the /etc/pam.d/common-auth file. Be careful with this file!!. If you mess it up you'd have to fix it from recovery mode.

This would make ubuntu ask you for your fingerprint or your password to grant you root access and also for login. So you can still use your password to login

sudo nano /etc/pam.d/common-auth

We need to add the lines:

# fingerprint authentication through fprintd
auth    sufficient                      pam_fprint.so

and modify the line that has pam_unix.so nullok_secure try_first_pass to make it sufficient, like this:

auth    sufficient      pam_unix.so nullok_secure try_first_pass

So finally here's what my file looks like.

Note that the behavior will depend on where you'll place the lines. If you place them above (the "Primary" block) part it'll first ask you for your fingerprint, then your password and vice-versa.

I hope someone can clarify or give a good pointer about how this file exactly works.

Finally...

cd ..
sudo cp vcsFPServiceDaemon /etc/init.d/
sudo update-rc.d vcsFPServiceDaemon defaults

and things should be working.