Some [Linux] Housekeeping

Posted in Guides, Linux, Ubuntu by aliencam | 4 Comments »

hRecent updates have broken functionality of both the fingerprint reader and screen brightness adjustment on my laptop  (Thinkpad X61 Tablet with Ubuntu 8.10).

Fingerprint Reader:


The problem with the fingerprint was that a recent security update had overwritten the /etc/pam.d/*-auth  files (it allerted me to this beforehand, but to prevent issues with the update I allowed it to totally overwrite my files).  If this happened to you, all you need to do is run the script to edit the /etc/pam.d/common-auth file to allow the fingerprint reader to be a method of authentication.

run the following command:

sudo '/usr/lib/pam-thinkfinger/pam-thinkfinger-enable'

nothing should return, but when you restart the authentication daemon (I don’t remember the command offhand, so I just restarted the computer) the fingerprint reader should work again.

Fixing ACPI Brightness Adjustment


After updating to the 2.6.27-11 kernel, brightness controls would not work for me or any of my friends with the Thinkpad X61 laptop.  There is not an update released yet to fix this, and it has been marked as  “low priority”. The low priority kind of makes me upset since sometimes I can’t even see my laptop screen because of it’s low screen brightness, and other times I get half of the battery life I’m used to since the brightness is all the way up.

Anyway, the fix I found for this was on the issue’s bug report.

In order to do this, you need to edit the /etc/modprobe.d/options file and add the line “options thinkpad_acpi brightness_enable=1″. There are many ways to do this, but my preferred is the following:

in a terminal, type:
sudo nano /etc/modprobe.d/options

then arrow down to the bottom, and then type:
# set to get brightness controlls working in 2.6.27.11 kernel
options thinkpad_acpi brightness_enable=1

exit by pressing ctrl-x then enter to save and overwrite the file. Now you can reboot and the brightness control should work just fine.

If you have any questions or the problems are not fixed by these then leave a comment.

–aliencam

Thinkpad Fingerprint Reader in Ubuntu 8.10 Intrepid

Posted in Guides, Linux, Ubuntu by aliencam | 4 Comments »

The version of thinkfinger in the Ubuntu 8.10 repositories does not yet work perfectly.  You can install and configure it close to the same way that it was in 8.04, however with one (annoying) difference.  Previously, you could just slide your fingerptint and it would be entered automatically, however a bug in this version makes it so that you have to slide your finger and then press the enter key.  if this doesn’t bother you, or you want to wait for the “official fix”, the follow these instructions (directions that fix this are  further below):

sudo apt-get install thinkfinger-tools libpam-thinkfinger

tf-tool --acquire

If that gives you an error, “could not get USB device” or similar, restart and try again.  Now it will ask you to slide your finger three times, do so until it reads 3 successful swipes.Then,

tf-tool --verify

It will ask you to swipe your finger one time, to verify the data on file. You no longer have to do the “tf-tool –add-user $USERNAME” command, it has been replaced by the above two commands.

At this point, there (thankfully) is a script that edits /etc/pam.d/common-auth so we don't have to. Execute the script with the following command:

sudo '/usr/lib/pam-thinkfinger/pam-thinkfinger-enable'

At this point everything should be working, just restart and you will be able to login and sudo using your fingerprint reader (keep reading to set it up to work on wake from suspend or screensaver).

If you do not want to have to press enter every time, before you install thinkfinger-tools and libpam-thinkfinger, you need to add the following sources to “Third Party Sources” under “Software Sources”:
deb ppa.launchpad.net/jon-oberheide/ubuntu intrepid main
deb-src ppa.launchpad.net/jon-oberheide/ubuntu intrepid main

Now, in order to have the fingerprint reader work to wake up from suspend or screensaver, use the following steps:

create a group “fingerprint” with the following command:

sudo groupadd fingerprint

then create a file with:

sudo nano /etc/udev/rules.d/60-thinkfinger.rules

Then paste in the following lines (use ctrl-shift-v to paste into terminal):


#
# udev rules file for the thinkfinger fingerprint scanner
#
# gives access to the fingerprint reader to those in the “fingerprint” group
#
# Taken from:
# www.thinkwiki.org/wiki/How_to_enable_the_fingerprint_reader_with_ThinkFinger
# which was taken and modified from:
# article.gmane.org/gmane.linux.drivers.thinkfinger/329
#

# SGS Thomson Microelectronics Fingerprint Reader
SYSFS{idVendor}==”0483″, SYSFS{idProduct}==”2016″, SYMLINK+=”input/thinkfinger-%k”, MODE=”0660″, GROUP=”fingerprint”

# the also-needed uinput device
KERNEL==”uinput”, MODE=”0660″, GROUP=”fingerprint”

Exit nano with ctrl-X, and save by hitting “y”.

Now, edit /etc/pam.d/gnome-screensaver with:

<code>sudo gedit /etc/pam.d/gnome-screensaver</code>

and add the lines:

auth sufficient pam_thinkfinger.so
auth required pam_unix.so try_first_pass nullok_secure

Between the two existing lines. save and exit.

Now add each user who has a fingerprint profile, and change the file permissions with the commands:

gpasswd -a $USERNAME fingerprint
chmod +x /home/$USERNAME/.thinkfinger.bir

Restart the computer, and it should work.  If you have any more problems leave a comment and I should be able to help you, or check out these other links that may help:

www.thinkwiki.org/wiki/How_to_enable_the_fingerprint_reader_with_ThinkFinger

and the bug report for the bug that requires you to hit enter:

bugs.launchpad.net/ubuntu/+source/thinkfinger/+bug/256429

There is one problem that I don’t know how to fix, every time I boot, I get an authentication box telling me that the application “Do” (I assume gnome-do) requires that the gnome-keyring be unlocked.  This only happens when you login with the fingerprint, not when you type in the password. There is no pam_gnome-keyring.so file, so I don’t know what else to add or change to get this to stop.  I will file a bug on launchpad when I get a chance.

I hope that works for everyone, it did for me!

–aliencam

NOTE: I did this yesterday, and today I noticed the fingerprint reader was getting really hot… I saw a mention of a bug that causes this on thinkwiki, but I think the problem only occurs when I am plugged in instead of on battery. I also know that turning on USB Autosuspend does solve it, and powertop will enable that for you… I will investigate further later.

further note: the problem did not persist. Enabling USB Autosuspend once seems to have fixed the problem indefinitely.  Use the powertop program and it should ask you to enable USB autosuspend if you have this problem. If not, read the thinkwiki entry on thinkfinger, and it should help. If that doesn’t help, leave a comment and I’ll get back to you.

UPDATE:
As of Feburary 16th, 2009 an update has broken functionality of thinkfinger. (it wrote over the /etc/pam.d/common-auth file) If the same thing happened to you, I wrote a post describing how to fix this problem.
http://blog.aliencam.net/2009/02/some-linux-housekeeping/

aliencam’s Customized Ubuntu Setup part VI: Fingerprint Reader

Posted in Life in General by aliencam | No Comments »

Lenovo Fingerprint reader (Lenovo Thinkpad laptops only!)

I suggest that before you do this you practice a few times. You must swipe your entire finger, and it is going to have to be at a slow and uniform speed. My thumbprint swipe takes about one second. I would like to post a video of this because people seriously have a very hard time with it, however I do not currently have a video. And it would be boring. But if i ever come across a video of correct thumb swiping procedure, I will be sure to post it.

In a terminal, enter:
sudo apt-get install thinkfinger-tools libpam-thinkfinger

Once that is complete enter:
sudo tf-tool --acquire

It will then ask you to swipe your finger three times. Do this and it will count each successful/ failed swipe. You need three successful swipes to finish. Then enter:
sudo tf-tool --verify

This will ask you to swipe your finger once, and will tell you if it matches or does not match. Now you need to make sure it actually uses that fingerprint information in password situations.
sudo gedit /etc/pam.d/common-auth

and change the contents of the file to read like this:
auth sufficient pam_thinkfinger.so
auth required pam_unix.so nullok_secure try_first_pass
auth optional pam_smbpass.so migrate

It should only be changing the first line and adding something to the second line, so I did not back up. I would suggest backing up if you are not comfortable in being able to undo that easily. Save and close, then enter:tf-tool –add-user $USERNAME
tf-tool --add-user $USERNAME
replacing “$USERNAME” with your username (should be all lowercase)
(Note: I don’t know if this needs to have sudo before it or not, but I tried both and both gave me an error. However when I logged out my thumbprint worked, so for now ignore the error.)

Now when you log in or need to enter your password in the terminal for sudo or need to enter it for nearly everything else, you can either slide your finger or type your password. For things like the Synaptic Package Manager or the Add/Remove Programs, it will not tell you that swiping oyur fingerprint is an option, but it will work anyway. (it will just say “enter your password”)
This does not however work for the screensaver password or the sleep-mode wake up password. For that you will either have to actually type in your password, or follow this marginally simple guide: http://www.thinkwiki.org/wiki/How_to_enable_the_fingerprint_reader_with_ThinkFinger and go to the section titled “xscreensaver/gnome-screensaver.” This is not in this guide because I like to have to type my password after a screensaver or sleep mode, and this is after all a guide to get Ubuntu set up how I like it.

Creative Commons License