On
OMG! Ubuntu! led a simple instruction on how to screw the image from the camera to enter the system. The security of this implementation still awaits its researcher, a small translation of notes and comments will be immediately given.
Important! The login function does not work yet if the user directory is encrypted.
First you need to install some libraries.
')
For Lucid:
sudo apt-get install build-essential cmake qt4-qmake libx11-dev libcv-dev libcvaux-dev libhighgui4 libhighgui-dev libqt4-dev libpam0g-dev libswscale0
For maverick:
sudo apt-get install build-essential cmake qt4-qmake libx11-dev libcv-dev libcvaux-dev libqt4-dev libpam0g-dev libswscale0 libhighgui-dev libhighgui2.1
Well, and then feed the terminal a sequence of commands, the meaning of which there is no need to explain to linuksoids:
cd /tmp
wget pam-face-authentication.googlecode.com/files/pam-face-authentication-0.3.tar.gz
tar zxf pam-face-authentication-0.3.tar.gz && cd pam-face-authentication-*
mkdir build && cd build
cmake -D CMAKE_INSTALL_PREFIX=/usr ..
make
sudo make install
After that, the “Qt Face Trainer” item will appear in the “Other” menu. There we can please the system with our own image and save several images of ourselves, our beloved. And if there is no item in the menu for some reason, then qt-facetrainer will help out in the terminal.

The program itself is looking for the face and eyes, highlighting the desired fragment of the image. By pressing the “Advanced Settings” key, you can make faces and determine the ranges in which the computer still agrees to perceive you
as normal for its owner.

By the way, apparently, the software focuses precisely on the eyes and eyebrow line, completely ignoring everything below. In the sense - all that is lower on the face.
Now we can fasten the recognition system to the login in a graphical interface. It is proposed to do the following:
sudo sed -i '1i auth sufficient pam_face_authentication.so enableX' /etc/pam.d/gdm
sudo sed -i '1i auth sufficient pam_face_authentication.so enableX' /etc/pam.d/gnome-screensaver
And you can also like this:
sudo sed -i '1i auth sufficient pam_face_authentication.so enableX' /etc/pam.d/su
sudo sed -i '1i auth sufficient pam_face_authentication.so enableX' /etc/pam.d/sudo
Correspondingly, if necessary, comment out these lines in these files.
The authors indicate that depending on the camera, you may need to install the Video4Linux library - libv4l and add it to the autoload
- create file /etc/ld.so.preload
- enter the path to the v41lcompat.so file, which is usually located in the / usr / lib / libv4l directory
Checked - works.
Although, as logically noted in the comments to the note, it would be more interesting if it were possible to check the image together with checking the password, and not instead of it.