Skip to content
Jan 28 / kkrizka

Enabling FingerPrint Scanner On ThinkPad X61 Running Ubuntu

The ThinkPad X61 Tablet comes with a fingerprint scanner that can come in quite useful if you use it in the tablet mode often. With it, you no longer have to flip to the keyboard to type in your password to login or authorize administrative actions. It also works very well on Ubuntu Linux, but it is not enabled by default. Quite a lot of work is necessary to get full fingerprint authentication even on the latest development Ubuntu release, Hardy Heron. So I decided to write this post to document how I got the ThinkPad fingerprint scanner fully working on my ThinkPad X61 Tablet. I can login anywhere — including GDM, screensaver lock and authenticating administrative actions using sudo — with just the swipe of a finger. If you would like to know more information about the status of the fingerprint reader on Linux, visit its ThinkWiki page or the Ubuntu ThinkFinger WiKi page.

  1. Add the necessary PPA deb repositories if you are running Ubuntu Gutsy. Hardy Heron comes with the latest packages in its official repositories.
    • Add the following lines to your /etc/apt/sources.list:
      deb http://ppa.launchpad.net/jldugger/ubuntu gutsy main restricted universe multiverse
      deb-src http://ppa.launchpad.net/jldugger/ubuntu gutsy main restricted universe multiverse
  2. Install the necessary packages: sudo apt-get install thinkfinger-tools libpam-thinkfinger
  3. Setup the fingerprint PAM module for authentication. Almost everything in Ubuntu uses PAM for authentication, so you will be able to login with just a swipe of the finger. You do this by adding the so_thinkfinger.so to the /etc/pam.d/common-auth file. It should look like the following:
    # /etc/pam.d/common-auth - authentication settings common to all services
    #
    # This file is included from other service-specific PAM config files,
    # and should contain a list of the authentication modules that define
    # the central authentication scheme for use on the system
    # (e.g., /etc/shadow, LDAP, Kerberos, etc.). The default is to use the
    # traditional Unix authentication mechanisms.
    #
    auth sufficient pam_thinkfinger.so
    auth required pam_unix.so try_first_pass nullok_secure
  4. The final step before you get to swipe your finger is to load the uinput module. Just add uinput at the end of the /etc/modules file. This will load the module automatically everytime you start your computer. However it is not available right away, so you will have to load it manually. Just type in the following line, and hit enter:
    sudo modprobe uinput
  5. That is it! You just need to add users and their fingerprints to the database. I suggest using my fingerauth that will set the correct permissions and ask you to swipe your finger. The usage is quite simple, just type in the following into the terminal:
    sudo ./fingerauth username

14 Comments

Leave a comment
  1. F Peeters / Feb 3 2008

    I love this one! So much easier and quicker than the previous methods I had to use…

    The only drawback is that you can onlyhave one fingerprint per account. There is a project that uses sqlite instead of .bir files, which can also do the identification part of logging in.

    It is worth a mention that in Gnome it doesn’t display anything special, but you can just swipe the finger at the password prompt…
    (ALso KDE is broken with this method, whereas the old method works fine in both Gnome and KDE…)

    Still a nice, useful post!

    Thx!

    • Karol Krizka / Feb 3 2008

      I never heard of that project, but it would be nice having several fingerprints in the database. That way I would not have to rotate the tablet everytime I am holding it at a different orientation. 😛

  2. Leo / Mar 27 2008

    Man, this stuff is super cool, makes life easier however I have some notes if you dont mind answering:
    I still have the problem of the device heats up, I thought they got fixed in the new release!! any idea how to fix that, Also noticed that the mouse pointer motion started to be slow!
    thanks in advanced

  3. dekoninckx / Jun 23 2008

    Hello,
    This sounds great, but how to use the fingerauth and what is it? Having completed the first steps, it says: fingerauth command not found.
    X61, Hardy
    Thanky you for your kind answer in advance!

  4. nicolas roy / Oct 20 2008

    Hello.

    the fingerprint recognition works well for any “sudo” command and also at boot, in gdm. But after a “sleep to RAM”, the login windows that appear does not propose to scan the finger, but only to type the passwd. Can we change that ?

    ThX,

    nicolas

  5. Dan St.Andre / Oct 29 2008

    Where do we find a source to download your scripts?

    ~~~ Saint 0;-D

  6. Dimitar / Oct 11 2009

    Somehow this screwed up my “sudo” now it doesn’t let me authenticate and I cannot even revert the changes as it requires super user privileges.

    I get authentication error, and I haven’t changed my password. Damn!

  7. Dan St.Andre / Jan 28 2010

    Is there any way to use fingerprint for login only and exempt sudo and similar use of fingerprint?

    Is it possible to configure which apps demand fingerprint vs. allow fingerprint vs. avoid fingerprint? For example, I want fingerprint reading when I use synaptic or update-manager or other GUI authentication. However, I don’t want fingerprint if I’m doing most command line tasks … I’m already typing so a password is okay. There may be occassional CLI tasks “sudo XXXX” where I want to force a fingerprint to make sure that it is really me running the software.

    Cheers,
    ~~~ 8d;-Dan

    ~~~ 8d;-Dan

  8. Karol Krizka / Jan 31 2010

    Dan St.Andre: Hmm, that is a good question. I’m not sure. If you know how to configure PAM for application specific login (thinkfinger is a PAM addon), then it should be possible.

  9. Jason h / Jun 2 2010

    ok im new but i wanted to know how you add the thinkfinger.so and what i do from there,

  10. Karol Krizka / Jun 6 2010

    Follow the tutorial in the post. But you can skip the first step, as thinkfinger-tools is now part of the official Ubuntu repository.

Trackbacks and Pingbacks

  1. How To Setup fprint For Fingerprint Authentication On Ubuntu | Karol Krizka
  2. things to look at (april 1st - april 8th) | stimulant - changing things around. . .
  3. Another Problem With Fingerprints And Linux: SSH and sudo | Karol Krizka
Leave a comment
Cancel reply