mirror of
https://github.com/boltgolt/howdy.git
synced 2024-09-12 09:41:18 +02:00
Fixes and readme update
This commit is contained in:
parent
7421eac023
commit
2f5b217c1b
3 changed files with 21 additions and 29 deletions
41
README.md
41
README.md
|
@ -1,46 +1,33 @@
|
|||
# Howdy for Ubuntu
|
||||
|
||||
Windows Hello™ style authentication for Ubuntu. Use your build in IR emitters and camera in combination with face recognition to prove who you are.
|
||||
Windows Hello™ style authentication for Ubuntu. Use your built-in IR emitters and camera in combination with face recognition to prove who you are.
|
||||
|
||||
Using the central authentication system in Linux (PAM), this works everywhere you would otherwise need your password: Login, lock screen, sudo, su, etc.
|
||||
|
||||
### Installation
|
||||
|
||||
First we need to install pam-python, fswebcam and OpenCV from the Ubuntu repositories:
|
||||
Run the installer by pasting (`ctrl+shift+V`) the following command into the terminal:
|
||||
|
||||
```
|
||||
sudo apt install libpam-python fswebcam libopencv-dev python-opencv
|
||||
```
|
||||
`wget -O /tmp/howdy_install.py https://raw.githubusercontent.com/Boltgolt/howdy/master/installer.py && sudo python3 /tmp/howdy_install.py`
|
||||
|
||||
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).
|
||||
|
||||
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.
|
||||
|
||||
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:
|
||||
|
||||
```
|
||||
python3 learn.py
|
||||
```
|
||||
|
||||
The script should guide you through the process.
|
||||
|
||||
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:
|
||||
|
||||
```
|
||||
auth sufficient pam_python.so /path/to/pam.py
|
||||
```
|
||||
|
||||
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.
|
||||
This will guide you through the installation. When that's done run `howdy add` to add a face model for the current user.
|
||||
|
||||
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.
|
||||
|
||||
### Command line
|
||||
|
||||
The installer adds a `howdy` command to manage face models for the current user. Use `howdy help` to list the available options.
|
||||
|
||||
### 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.
|
||||
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.
|
||||
|
||||
If you encounter an error that hasn't been reported yet, don't be afraid to open a new issue.
|
||||
|
||||
### 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.
|
||||
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.
|
||||
|
||||
DO NOT USE THIS SCRIPT AS THE SOLE AUTHENTICATION METHOD FOR YOUR SYSTEM.
|
||||
DO NOT USE HOWDY AS THE SOLE AUTHENTICATION METHOD FOR YOUR SYSTEM.
|
||||
|
|
|
@ -95,7 +95,7 @@ if len(encodings) > 0:
|
|||
label_in = input("Enter a label for this new model [" + label + "]: ")
|
||||
|
||||
if label_in != "":
|
||||
label = label_in
|
||||
label = label_in[:24]
|
||||
|
||||
insert_model = {
|
||||
"time": int(time.time()),
|
||||
|
|
|
@ -54,6 +54,7 @@ for dev in devices:
|
|||
|
||||
if (picked == False):
|
||||
print("\033[31mNo suitable IR camera found\033[0m")
|
||||
sys.exit()
|
||||
|
||||
log("Cloning dlib")
|
||||
|
||||
|
@ -158,4 +159,8 @@ diag_out += "```"
|
|||
print("https://github.com/Boltgolt/howdy/issues/new?title=%5Bdiag%5D%20Post-installation%20camera%20information&body=" + urllib.parse.quote_plus(diag_out) + "\n")
|
||||
|
||||
print("Installation complete.")
|
||||
print("If you want to help the development, please use the link above to post some camera-related information as a new github issue")
|
||||
print("If you want to help the development, please use the link above to post some camera-related information to github")
|
||||
|
||||
# Remove the installer if downloaded to tmp
|
||||
if os.path.exists("/tmp/howdy_install.py"):
|
||||
os.remove("/tmp/howdy_install.py")
|
||||
|
|
Loading…
Reference in a new issue