Wednesday, 9 March 2011

[FIX] qt-facetrainer does not generate model for user (pam-face-authentication on openSuSE)

I was setting up the pam-face-authentication module using opencv on openSuSE today (following this guide). The installation process went well, using the one-click-install package. However, after running qt-facetrainer and adding the correct entries to /etc/pam.d/sudo I encountered the following error:

david@laptop:~> sudo -s
> Camera 0
mmap: Invalid argument
munmap: Invalid argument
munmap: Invalid argument
munmap: Invalid argument
munmap: Invalid argument
Unable to stop the stream.: Bad file descriptor
munmap: Invalid argument
munmap: Invalid argument
munmap: Invalid argument
munmap: Invalid argument
 Face Verification Pluggable Authentication Module Started
Biometrics Model not Generated for the User.
Giving Up Face Authentication. Try Again=(.
root's password:
root's password:
sudo: pam_authenticate: Authentication token manipulation error
The fix turned out to be simple. Instead of running qt-facetrainer as myself, I had to run it as root (kdesu qt-facetrainer). This generated a face model for the root user, which allows me to authenticate myself as root using sudo. I still encounter the munmap errors, but I am now able to authenticate myself for su and sudo using face recognition!

No comments: