https://www.thinkwiki.org/w/api.php?action=feedcontributions&user=Welkin&feedformat=atomThinkWiki - User contributions [en]2024-03-28T17:05:54ZUser contributionsMediaWiki 1.31.12https://www.thinkwiki.org/w/index.php?title=How_to_enable_the_integrated_fingerprint_reader_with_ThinkFinger&diff=31821How to enable the integrated fingerprint reader with ThinkFinger2007-08-08T16:00:29Z<p>Welkin: </p>
<hr />
<div>[[How to enable the fingerprint reader]] has a good explanation for using the fingerprint reader with the closed-source binary driver. But there is also an opensource project called [http://thinkfinger.sourceforge.net ThinkFinger] which does the same, but open.<br />
<br />
== Installing from source ==<br />
Speaking for Debian, there are no packages of ThinkFinger in the repositories yet (cf. [http://bugs.debian.org/409563 bug #409563]), so I describe the installation from source. If you are using Gentoo, you can just emerge sys-auth/thinkfinger.<br />
<br />
{{NOTE|packages for Debian (testing) are available here: [http://www.rubixlinux.org/debian/thinkfinger/]}}<br />
{{NOTE|packages for Fedora Core 6 are available in "extras" repository (#yum install thinkfinger)}}<br />
{{NOTE|openSUSE 10.2 includes the package "libthinkfinger" (version 0.1-7) - you will find newer packages here: [http://beta1.suse.com/private/thoenig/10.2/thinkfinger/]}}<br />
<br />
<br />
Download thinkfinger-0.3.tar.gz from the [http://thinkfinger.sourceforge.net/ homepage] and unpack it somewhere, make sure you have the gcc compiler, libtool, pkgconfig, libusb-dev and libpam0g-dev installed, then:<br />
<br />
{{cmduser|cd thinkfinger-0.3}}<br />
<br />
<code style="white-space:nowrap;color:#495988;background-color:white;"><nowiki>$</nowiki> ./configure --with-securedir=/lib/security --with-birdir=/etc/pam_thinkfinger</code><br />
<br />
{{cmduser|make}}<br />
<br />
{{cmdroot|make install}}<br />
<br />
{{NOTE|/lib/security is the dir, where pam assumes its modules on Debian and openSUSE, it may vary for your distro!}}<br />
<br />
{{NOTE|for openSUSE use this configure-command:}}<br />
<code style="white-space:nowrap;color:#495988;background-color:white;"><nowiki>$</nowiki> ./configure --prefix=/usr --with-securedir=/lib/security --with-birdir=/etc/pam_thinkfinger</code><br />
<br />
<br />
If everything went ok assert that you find pam_thinkfinger.so in /lib/security typing:<br />
<br />
{{cmduser|ls /lib/security}}<br />
<br />
== Testing the driver ==<br />
Now the driver is installed and should be working. You can try it (as root) with<br />
<br />
{{cmdroot|tf-tool --acquire}}<br />
<br />
and<br />
<br />
{{cmdroot|tf-tool --verify}}<br />
<br />
This will ask you to swipe your finger three times, save the fingerprint to /tmp/test.bir and then verify your fingerprint with the bir-file.<br />
<br />
== Configuring PAM to use ThinkFinger ==<br />
Now you can configure pam to use ThinkFinger:<br />
<br />
Open /etc/pam.d/common-auth:<br />
{{NOTE|In FC6 this file is "/etc/pam.d/system-auth"}}<br />
<br />
{{cmdroot|nano -w /etc/pam.d/common-auth}}<br />
<br />
Add this line before any pam_unix or pam_unix2 directives:<br />
auth sufficient pam_thinkfinger.so<br />
<br />
If your PAM uses the pam_unix and not the pam_unix2 module, you need to pass a specific argument in<br />
the /etc/pam.d/common-auth directive to make it consider the password entered at the pam_thinkfinger prompt.<br />
auth required pam_unix.so try_first_pass<br />
<br />
For instance my /etc/pam.d/common-auth looks like this:<br />
auth sufficient pam_thinkfinger.so<br />
auth required pam_unix.so nullok_secure try_first_pass<br />
<br />
On openSUSE 10.2 it looks like this now:<br />
auth required pam_env.so<br />
auth sufficient pam_thinkfinger.so<br />
auth required pam_unix2.so<br />
<br />
Now we are ready to add users to thinkfinger. As make install did not create /etc/pam_thinkfinger, we need to create it now:<br />
<br />
{{cmdroot|mkdir /etc/pam_thinkfinger}}<br />
<br />
And now we can add a fingerprint for a user with:<br />
<br />
{{cmdroot|tf-tool --add-user $USERNAME}}<br />
<br />
Now the user should be able to login with his finger, instead of the password.<br />
<br />
{{NOTE|You should see the "Password or swipe finger:" prompt when trying to sudo or su. If you don't, you probably do not have the "User level driver support" compiled into your kernel or the "uinput" module loaded!}}<br />
<br />
{{NOTE|If you would like to use thinkfinger for su, you have to enroll fingerprint for root user! (tf-tool --add-user root)}}<br />
{{NOTE|gksu/gksudo seems to break. However, it just stays invisible. When starting a su privileged application such as synaptics you will not get prompted for the password. Nevertheless you can swipe your finger and it should authenticate you. Starting synaptics twice makes gksudo visible.}}<br />
<br />
{{NOTE|Using gksu/gksudo in ubuntu Feist Fawn (7.04) with thinkfinger enabled, crashed gksu/gksudo everytime I tried to authenticate.<br />
Changing the string "Password or swipe finger:" to a plain "Password:" (like sudo normally would do) in the file pam/pam_thinkfinger.c of the thinkfinger source directory, fixed this behavior ( I'm using thinkfinger 0.3 ). Of course in the Console you will then only see a "Password:" instead of "Password or swipe finger:" but this is still more usefull than having gksu/gksudo crashing everytime :).}}<br />
<br />
Integration in KDE and kdm seems not to be easily possible now. There is a filed bug at kde.org where you can vote for this: [https://bugs.kde.org/show_bug.cgi?id=116682]<br />
<br />
This Howto was copied from [[Installing Ubuntu 6.06 on a ThinkPad T43#Fingerprint_Reader]] and then slightly modified by me.</div>Welkinhttps://www.thinkwiki.org/w/index.php?title=How_to_enable_the_integrated_fingerprint_reader_with_ThinkFinger&diff=31820How to enable the integrated fingerprint reader with ThinkFinger2007-08-08T15:59:28Z<p>Welkin: </p>
<hr />
<div>[[How to enable the fingerprint reader]] has a good explanation for using the fingerprint reader with the closed-source binary driver. But there is also an opensource project called [http://thinkfinger.sourceforge.net ThinkFinger] which does the same, but open.<br />
<br />
== Installing from source ==<br />
Speaking for Debian, there are no packages of ThinkFinger in the repositories yet (cf. [http://bugs.debian.org/409563 bug #409563]), so I describe the installation from source. If you are using Gentoo, you can just emerge sys-auth/thinkfinger.<br />
<br />
{{NOTE|packages for Debian (testing) are available here: [http://www.rubixlinux.org/debian/thinkfinger/]}}<br />
{{NOTE|packages for Fedora Core 6 are available in "extras" repository (#yum install thinkfinger)}}<br />
{{NOTE|openSUSE 10.2 includes the package "libthinkfinger" (version 0.1-7) - you will find newer packages here: [http://beta1.suse.com/private/thoenig/10.2/thinkfinger/]}}<br />
<br />
<br />
Download thinkfinger-0.3.tar.gz from the [http://thinkfinger.sourceforge.net/ homepage] and unpack it somewhere, make sure you have the gcc compiler, libtool, pkgconfig, libusb-dev and libpam0g-dev installed, then:<br />
<br />
{{cmduser|cd thinkfinger-0.3}}<br />
<br />
<code style="white-space:nowrap;color:#495988;background-color:white;"><nowiki>$</nowiki> ./configure --with-securedir=/lib/security --with-birdir=/etc/pam_thinkfinger</code><br />
<br />
{{cmduser|make}}<br />
<br />
{{cmdroot|make install}}<br />
<br />
{{NOTE|/lib/security is the dir, where pam assumes its modules on Debian and openSUSE, it may vary for your distro!}}<br />
<br />
{{NOTE|for openSUSE use this configure-command:}}<br />
<code style="white-space:nowrap;color:#495988;background-color:white;"><nowiki>$</nowiki> ./configure --prefix=/usr --with-securedir=/lib/security --with-birdir=/etc/pam_thinkfinger</code><br />
<br />
<br />
If everything went ok assert that you find pam_thinkfinger.so in /lib/security typing:<br />
<br />
{{cmduser|ls /lib/security}}<br />
<br />
== Testing the driver ==<br />
Now the driver is installed and should be working. You can try it (as root) with<br />
<br />
{{cmdroot|tf-tool --acquire}}<br />
<br />
and<br />
<br />
{{cmdroot|tf-tool --verify}}<br />
<br />
This will ask you to swipe your finger three times, save the fingerprint to /tmp/test.bir and then verify your fingerprint with the bir-file.<br />
<br />
== Configuring PAM to use ThinkFinger ==<br />
Now you can configure pam to use ThinkFinger:<br />
<br />
Open /etc/pam.d/common-auth:<br />
{{NOTE|In FC6 this file is "/etc/pam.d/system-auth"}}<br />
<br />
{{cmdroot|nano -w /etc/pam.d/common-auth}}<br />
<br />
Add this line before any pam_unix or pam_unix2 directives:<br />
auth sufficient pam_thinkfinger.so<br />
<br />
If your PAM uses the pam_unix and not the pam_unix2 module, you need to pass a specific argument in<br />
the /etc/pam.d/common-auth directive to make it consider the password entered at the pam_thinkfinger prompt.<br />
auth required pam_unix.so try_first_pass<br />
<br />
For instance my /etc/pam.d/common-auth looks like this:<br />
auth sufficient pam_thinkfinger.so<br />
auth required pam_unix.so nullok_secure try_first_pass<br />
<br />
On openSUSE 10.2 it looks like this now:<br />
auth required pam_env.so<br />
auth sufficient pam_thinkfinger.so<br />
auth required pam_unix2.so<br />
<br />
Now we are ready to add users to thinkfinger. As make install did not create /etc/pam_thinkfinger, we need to create it now:<br />
<br />
{{cmdroot|mkdir /etc/pam_thinkfinger}}<br />
<br />
And now we can add a fingerprint for a user with:<br />
<br />
{{cmdroot|tf-tool --add-user $USERNAME}}<br />
<br />
Now the user should be able to login with his finger, instead of the password.<br />
<br />
{{NOTE|You should see the "Password or swipe finger:" prompt when trying to sudo or su. If you don't, you probably do not have the "User level driver support" compiled into your kernel or the "uinput" module loaded!}}<br />
<br />
{{NOTE|If you would like to use thinkfinger for su, you have to enroll fingerprint for root user! (tf-tool --add-user root)}}<br />
{{NOTE|gksu/gksudo seems to break. However, it just stays invisible. When starting a su privileged application such as synaptics you will not get prompted for the password. Nevertheless you can swipe your finger and it should authenticate you. Starting synaptics twice makes gksudo visible.}}<br />
<br />
{{NOTE|Using gksu/gksudu in ubuntu Feist Fawn (7.04) with thinkfinger enabled, crashed gksu/gksudu everytime I tried to authenticate.<br />
Changing the string "Password or swipe finger:" to a plain "Password:" (like sudo normally would do) in the file pam/pam_thinkfinger.c of the thinkfinger source directory, fixed this behavior ( I'm using thinkfinger 0.3 ). Of course in the Console you will then only see a "Password:" instead of "Password or swipe finger:" but this is still more usefull than having gksu/gksudu crashing everytime :).}}<br />
<br />
Integration in KDE and kdm seems not to be easily possible now. There is a filed bug at kde.org where you can vote for this: [https://bugs.kde.org/show_bug.cgi?id=116682]<br />
<br />
This Howto was copied from [[Installing Ubuntu 6.06 on a ThinkPad T43#Fingerprint_Reader]] and then slightly modified by me.</div>Welkin