You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Windows Hello™ style authentication for Ubuntu. Use your build in IR emitters and camera in combination with face recognition to prove who you are.
3
+
Windows Hello™ style authentication for Ubuntu. Use your built-in IR emitters and camera in combination with face recognition to prove who you are.
4
+
5
+
Using the central authentication system in Linux (PAM), this works everywhere you would otherwise need your password: Login, lock screen, sudo, su, etc.
4
6
5
7
### Installation
6
8
7
-
First we need to install pam-python, fswebcam and OpenCV from the Ubuntu repositories:
9
+
Run the installer by pasting (`ctrl+shift+V`) the following command into the terminal:
After that, install the face_recognition python module. There's an excellent step by step guide on how to do this on [its github page](https://github.com/ageitgey/face_recognition#installation).
14
-
15
-
In the root of your cloned repo is a file called `config.ini`. The `device_id` variable in this file is important, make sure it is the IR camera and not your normal webcam.
15
+
This will guide you through the installation. When that's done run `howdy USER add` and replace `USER` with your username to add a face model.
16
16
17
-
Now it's time to let Howdy learn your face. The learn.py script will make 3 models of your face and store them as an encoded set in the `models` folder. To run the script, open a terminal, navigate to this repository and run:
17
+
If nothing went wrong we should be able to run sudo by just showing your face. Open a new terminal and run `sudo -i`to see it in action.
18
18
19
-
```
20
-
python3 learn.py
21
-
```
19
+
**Note:** The build of dlib can hang on 100% for over a minute, give it time.
22
20
23
-
The script should guide you through the process.
21
+
### Command line
24
22
25
-
Finally we need to tell PAM that there's a new module installed. Open `/etc/pam.d/common-auth` as root (`sudo nano /etc/pam.d/common-auth`) and add the following line to the top of the file:
23
+
The installer adds a `howdy` command to manage face models for the current user. Use `howdy help`to list the available options.
26
24
27
-
```
28
-
auth sufficient pam_python.so /path/to/pam.py
29
-
```
25
+
### Troubleshooting
30
26
31
-
Replace the final argument with the full path to pam.py in this repository. The `sufficient` control tells PAM that Howdy is enough to authenticate the user, but if it fails we can fall back on more traditional methods.
27
+
Any python errors 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.
32
28
33
-
If nothing went wrong we should be able to run sudo by just showing your face. Open a new terminal and run `sudo -i` to see it in action.
34
-
35
-
### Troubleshooting
29
+
If you encounter an error that hasn't been reported yet, don't be afraid to open a new issue.
36
30
37
-
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.
31
+
### Uninstalling
38
32
33
+
There is an uninstaller available, run `sudo python3 /lib/security/howdy/uninstall.py` to remove Howdy from your system.
39
34
40
35
### A note on security
41
36
42
37
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.
43
38
44
-
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.
39
+
To minimize the chance of this script being compromised, it's recommend to leave this repo in /lib/security and to keep it read only.
45
40
46
-
DO NOT USE THIS SCRIPT AS THE SOLE AUTHENTICATION METHOD FOR YOUR SYSTEM.
41
+
DO NOT USE HOWDY AS THE SOLE AUTHENTICATION METHOD FOR YOUR SYSTEM.
0 commit comments