Add Facial Recognition Password Login to Ubuntu Linux Distro

Ubuntu the most famous and community backed Linux distro got another awesome feature as third-party add-on. Linux enthusiasts can now login to their Ubuntu Linux OS using Face as password. The facial recognition software in use is the pam-face-authentication utility that can let users login only once their face is recognised by the login tool.

Ubuntu face login

How to install facial recognition tool in Ubuntu Linux distro:

1) Install the dependencies required to run the face recognition tool. You can install that by executing the following command in terminal. To open  Terminal go to Applications > Accessories > Terminal. The commands are different for Lucid Lynx and Maverick Meerkat users:

Ubuntu Terminal

Lucid Lynx users: -

sudo apt-get install build-essential cmake qt4-qmake libx11-dev libcv-dev libcvaux-dev libhighgui4 libhighgui-dev libqt4-dev libpam0g-dev libswscale0

Maverick Meerkat users:

sudo apt-get install build-essential cmake qt4-qmake libx11-dev libcv-dev libcvaux-dev libqt4-dev libpam0g-dev libswscale0 libhighgui-dev libhighgui2.1

Ubuntu face login sudo command

2) Install the face recognition tool by executing the following commands one at a time.

cd /tmp

wget http://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

3) Run the ‘Face Trainer’ application from the Applications > Other menu.

Ubuntu face login tool

Steps to add face recognition tool to GNOME display manager (GDM):

For the face login feature to be added to your default GNOME display manager you should execute the following sudo commands,

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

Depending on your webcam model/make you may need to install and add libv4l to preload:

  • Create the file /etc/ld.so.preload
  • Paste in the path to the v411compat.so file commonly found in /usr/lib/libv4l

Via

Comments

  1. This software would be awesome if it ever worked, I have spent far too much time buggering around with taking reference pics in the trainer application, under all kinds of light conditions and with varied facial expressions. I even turned the security level down to almost the lowest and got nowhere.

  2. Wow, one of the things I missed from Windows 7 was a face recognition on login. I’m very glad that there is a working one for Ubuntu! And this one works much better than the MW7 one.

    Thanks to whom ever contributed. This works great!

    And, the instructions were easy to follow and understand!

  3. Thor Magne says:

    A picture of you will fool it, I tried, only had to curve the photo slightly and it logged it. Safety for you……

  4. Did not work !
    how to uninstall?

  5. Niranjan says:

    will these commands also work for Natty Narwhal???

  6. Hey, that’s work well!
    Even the method PAM provide don’t work for me.

    Thanks! It’s work!

  7. Prabesh says:

    works well for me in Natty.
    Thanks!

  8. Please sir how can i delete this thing :(
    i don’t wanna it any more , i know its too old post , but please i’m stuck with it !
    please help me :(

    • Hey,

      although it’s not really a clean way, you can disable the face authentication by removing the first line in the files /etc/pam.d/gdm and /etc/pam.d/gnome-screensaver (these lines were added in the last two commands).
      To do this, you need admin rights. Make sure you make a copy of the files first, just to play on the safe side…
      The files that were built or copied to your folders are a bit harder to remove (spread over the /bin, /usr, /etc folders). Have a look at the installation files, starting with the Makefile, section ‘install’

      Hope this helps

  9. Chris Anderson says:

    This is the worst software I’ve seen to date. Not only does it not work it is as hard as hell to remove from your system.