SDB:Facial authentication

Jump to: navigation, search


Tested on openSUSE

Recommended articles

Icon-manual.png

Related articles

Icon-help.png



Warning: This guide and package is only applicable for x86_64 distributives.

Situation

You have built-in camera (and IR emitters optionally) and want to use the Windows Hello™ style facial authentication for openSUSE based on howdy package.

Procedure

Installing with YaST or Zypper requires logging in as root.

Add the RPM Repository

YaST

  1. Open YaST Control Center, then click Software Repositories.
  2. Click Add and Next.
  3. Enter name "dmafanasyev" and set the repository URL according to your version of openSUSE.
openSUSE Leap 15.0
http://download.opensuse.org/repositories/home:/dmafanasyev/openSUSE_Leap_15.0/
openSUSE Leap 15.1
http://download.opensuse.org/repositories/home:/dmafanasyev/openSUSE_Leap_15.1/
openSUSE Tumbleweed
http://download.opensuse.org/repositories/home:/dmafanasyev/openSUSE_Tumbleweed

Zypper

According to your version of openSUSE run in terminal:

openSUSE Leap 15.0
# sudo zypper addrepo --refresh http://download.opensuse.org/repositories/home:/dmafanasyev/openSUSE_Leap_15.0/ dmafanasyev
           
openSUSE Leap 15.1
# sudo zypper addrepo --refresh http://download.opensuse.org/repositories/home:/dmafanasyev/openSUSE_Leap_15.1/ dmafanasyev
           
openSUSE Tumbleweed
# sudo zypper addrepo --refresh http://download.opensuse.org/repositories/home:/dmafanasyev/openSUSE_Tumbleweed/ dmafanasyev
           

Install

YaST

  1. Go to the YaST Control Center and click Software Management.
  2. View > Repositories > dmafanasyev
  3. Choose the howdy package
  4. Press Accept

Zypper

Run in terminal

# sudo zypper in howdy

Configuration

Howdy

Log in as the root user and open the file /usr/lib64/security/howdy/config.ini using your favorite text editor (e.g. mcedit, nano or vi). For example for mcedit:

# sudo mcedit /usr/lib64/security/howdy/config.ini

Set the parameter device_path:

device_path = <the path to the device to capture frames from>

For the simplest case this is path to camera (for your Laptop the index 0 may be different):

device_path = /dev/video0

But it is better to use IR emmiters because it will be work correct in the dark place also. Try different index in the path to find apropriate value. For example this is may be index 2:

device_path = /dev/video2

If you plan to use only camera dose not change the parameter recording_plugin (default is opencv). But to use the IR emmiters you need to set:

recording_plugin = ffmpeg

This is only one way to grab frames from IR emmiters correct. In case when recording_plugin is opencv and IR emmiters used the error occures (see issue #160 on GitHub):

V4L2: Pixel format of incoming image is unsupported by OpenCV

You can change another parameters according to the comments in config file. For example set:

detection_notice = true

to print that face detection is being attempted.

At the last step add face model using command:

# sudo howdy add

This is good idea to add about 3-5 models for increasing accuracy of face recognition.

PAM

Now you need to tell PAM to use facial authentication. The directory /etc/pam.d/ contains the configuration files of authentication for different system services. The most interesting are:

  • /etc/pam.d/sddm - configuration of login into graphical user interface through SDDM (the login screen after system start up but before desktop environment launch)
  • /etc/pam.d/login - configuration of login into terminal mode
  • /etc/pam.d/kscreenlocker - configuration of screen unlock for KDE

Log in as the root user, open the configuaration file for service under interest using your favorite text editor (e.g. mcedit, nano or vi), and insert on first line the following string:

auth     sufficient     pam_python.so /usr/lib64/security/howdy/pam.py

Known issues

In some cases howdy does not recognize your face. If this happen during screen unlock or login into terminal mode you could try it again. But in SDDM only one attempt works correct while next time nothing happens. As workaround you could enter "Ctrl + Alt + Backspace" to restart graphical interface and try again.

See also

External links