From 799bab81a67df3d4f782be2dd4eea4f06debac15 Mon Sep 17 00:00:00 2001 From: boltgolt Date: Wed, 17 Jan 2018 21:38:16 +0100 Subject: [PATCH] Spelling fixes and an added note on security --- README.md | 9 +++++++++ config.ini | 6 +++--- pam.py | 2 +- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index ecea2cb..775ad62 100644 --- a/README.md +++ b/README.md @@ -35,3 +35,12 @@ If nothing went wrong we should be able to run sudo by just showing your face. O ### Troubleshooting Any errors in the script itself get logged directly into the console and should indicate what went wrong. If authentication still fails but no errors are printed you could take a look at the last lines in `/var/log/auth.log` to see if anything has been reported there. + + +### A note on security + +This script is in no way as secure as a password and will never be. Although it's harder to fool than normal face recognition, a person who looks similar to you or well-printed photo of you could be enough to do it. + +To minimize the chance of this script being compromised, it's recommend to store this repo in `/etc/pam.d` and to make it read only. + +DO NOT USE THIS SCRIPT AS THE SOLE AUTHENTICATION METHOD FOR YOUR SYSTEM. diff --git a/config.ini b/config.ini index 1e6d031..cd4819c 100644 --- a/config.ini +++ b/config.ini @@ -1,14 +1,14 @@ [core] -# Do not print anything when a face vericication succeeds +# Do not print anything when a face verification succeeds no_confirmation = false # When a user without a known face model tries to use this script, don't # show an error but fail silently -supress_unknown = false +suppress_unknown = false [video] # The certainty of the detected face belonging to the user of the account -# On a scale from 1 to 10, values above 5 are not recomended +# On a scale from 1 to 10, values above 5 are not recommended certainty = 3 # The number of frames to capture and to process before timing out diff --git a/pam.py b/pam.py index 4a32770..37c1d5d 100644 --- a/pam.py +++ b/pam.py @@ -20,7 +20,7 @@ def doAuth(pamh): # Status 10 means we couldn't find any face models if status == 10: - if config.get("core", "supress_unknown") != "true": + if config.get("core", "suppress_unknown") != "true": pamh.conversation(pamh.Message(pamh.PAM_ERROR_MSG, "No face model known")) return pamh.PAM_USER_UNKNOWN # Status 11 means we exceded the maximum retry count