Some dependencies need to be installed for PFA. To do so, open a terminal and paste this command:
sudo apt-get install build-essential cmake qt4-qmake libx11-dev libcv-dev libcvaux-dev libhighgui4 libhighgui-dev libqt4-dev libpam0g-dev checkinstall
We are also installing checkinstall - program that will create a package out of the installed files as to not mess up the computer and make it easy to uninstall the whole thing.
To install PFA itself, you need to execute the following commands in the terminal.
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 checkinstall --pkgname=pam-authentication-face-auth
Checkinstall will ask you about few things, you can easily just say Yes and press Enter few times. It will install the package automatically.
Now it's necessary to learn some face figures to the system. Therefore execute
qt-facetrainer
from command line or startup menu. Then follow the instructions on the screen and put up a pretty smile. Note: Don't execute qt-facetrainer as root!
For being able to login using face authentication, the module must be enabled first. There are two ways to do this and you might choose either Option A or B
Option A: Execute these commands to enable face authentication in Ubuntu's login manager:
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
If you are using Ubuntu (GDM), issue the following 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
When using Kubuntu (KDE), execute the following:
sudo sed -i '1i auth sufficient pam_face_authentication.so enableX' /etc/pam.d/kde
Option B: The second way is to create a PAM profile first and then enable it. So, in terminal you have to execute the following (at once):
cat << EOF | sudo tee /usr/share/pam-configs/face_authentication /dev/null Name: face_authentication profile Default: yes Priority: 900 Auth-Type: Primary Auth: [success=end default=ignore] pam_face_authentication.so enableX EOF
sudo pam-auth-update --package face_authentication
评论