Skip to content

Commit

Permalink
New CLI and debian package structure
Browse files Browse the repository at this point in the history
  • Loading branch information
boltgolt committed Apr 13, 2018
2 parents 46e0547 + 3f7ab7d commit e700de7
Show file tree
Hide file tree
Showing 33 changed files with 757 additions and 415 deletions.
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -101,4 +101,10 @@ ENV/
.mypy_cache/

# generated models
/models
/src/models

# build files
debian/howdy.substvars
debian/files
debian/debhelper-build-stamp
debian/howdy
25 changes: 25 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
sudo: required
language: python
python:
- "3.4"
- "3.6"

install:
# Install build tools and ack-grep for checks
- sudo apt install devscripts dh-make ack-grep -y

script:
# Build the binary (.deb)
- debuild -i -us -uc -b
# Install the binary, also fireing the debian scripts
- sudo apt install ../*.deb -y
# Check if the username passthough works correctly with sudo
- 'howdy | ack-grep --passthru --color "current active user: travis"'
- 'sudo howdy | ack-grep --passthru --color "current active user: travis"'
# Remove howdy from the installation
- sudo apt purge howdy -y

notifications:
email:
on_success: never
on_failure: always
37 changes: 26 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,41 +1,56 @@
# Howdy for Ubuntu
# Howdy for Ubuntu [![](https://img.shields.io/travis/Boltgolt/howdy/master.svg)](https://travis-ci.org/Boltgolt/howdy) [![](https://img.shields.io/github/release/Boltgolt/howdy.svg?colorB=4c1)](https://github.com/Boltgolt/howdy/releases) [![](https://img.shields.io/github/issues-raw/Boltgolt/howdy/enhancement.svg?label=feature+requests&colorB=4c1)](https://github.com/Boltgolt/howdy/issues?q=is%3Aissue+is%3Aopen+label%3Aenhancement)

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

Run the installer by pasting (`ctrl+shift+V`) the following command into the terminal:
Run the installer by pasting (`ctrl+shift+V`) the following commands into the terminal one at a time:

```
wget -O /tmp/howdy_install.py https://raw.githubusercontent.com/Boltgolt/howdy/master/installer.py && sudo python3 /tmp/howdy_install.py
sudo add-apt-repository ppa:boltgolt/howdy
sudo apt update
sudo apt install howdy
```

This will guide you through the installation. When that's done run `sudo howdy USER add` and replace `USER` with your username to add a face model.
**Note:** The build of dlib can hang on 100% for over a minute, give it time.

This will guide you through the installation. When that's done run `sudo howdy add` to add a face model.

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.

**Note:** The build of dlib can hang on 100% for over a minute, give it time.
If you're curious you can run `sudo howdy config` to open the central config file and see the options Howdy has.

### Command line

The installer adds a `howdy` command to manage face models for the current user. Use `howdy help` to list the available options.
The installer adds a `howdy` command to manage face models for the current user. Use `howdy --help` or `man howdy` to list the available options.

Usage:
```
howdy [-U user] [-y] command [argument]
```

| Command | Description |
|-----------|-----------------------------------------------|
| `add` | Add a new face model for an user |
| `clear` | Remove all face models for an user |
| `config` | Open the config file in gedit |
| `disable` | Disable or enable howdy |
| `list` | List all saved face models for an user |
| `remove` | Remove a specific model for an user |
| `test` | Test the camera and recognition methods |

### Troubleshooting

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.

### Uninstalling

There is an uninstaller available, run `sudo python3 /lib/security/howdy/uninstall.py` to remove Howdy from your system.

### 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 leave this repo in /lib/security and to keep it read only.
To minimize the chance of this program being compromised, it's recommend to leave Howdy in /lib/security and to keep it read only.

DO NOT USE HOWDY AS THE SOLE AUTHENTICATION METHOD FOR YOUR SYSTEM.
1 change: 1 addition & 0 deletions autocomplete.sh → autocomplete/howdy
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/bin/bash
# Autocomplete file run in bash
# Will sugest arguments on tab

Expand Down
53 changes: 0 additions & 53 deletions cli.py

This file was deleted.

17 changes: 0 additions & 17 deletions cli/help.py

This file was deleted.

25 changes: 25 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
howdy (2.1.0) xenial; urgency=medium

* First complete PPA release
* Reworked CLI

-- boltgolt <[email protected]> Fri, 13 Apr 2018 22:22:27 +0200

howdy (2.0.0-alpha+3) xenial; urgency=medium

* Fixed issue where dlib dependency failed to install on some installations
* Added preinst script for camera detection

-- boltgolt <[email protected]> Thu, 12 Apr 2018 21:42:42 +0000

howdy (2.0.0-alpha+2) xenial; urgency=medium

* Fixed build dependency issue

-- boltgolt <[email protected]> Sat, 07 Apr 2018 21:30:48 +0200

howdy (2.0.0-alpha+1) xenial; urgency=low

* Initial packaged release.

-- boltgolt <[email protected]> Wed, 04 Apr 2018 18:13:15 +0200
1 change: 1 addition & 0 deletions debian/compat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
10
15 changes: 15 additions & 0 deletions debian/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Source: howdy
Section: misc
Priority: optional
Standards-Version: 3.9.7
Build-Depends: python, dh-python, devscripts, dh-make, debhelper
Maintainer: boltgolt <[email protected]>
Vcs-Git: https://github.com/Boltgolt/howdy

Package: howdy
Homepage: https://github.com/Boltgolt/howdy
Architecture: all
Depends: ${misc:Depends}, git, python3, python3-pip, python3-dev, python3-setuptools, build-essential, libpam-python, fswebcam, libopencv-dev, python-opencv, cmake
Description: Windows Hello style authentication for Ubuntu.
Use your built-in IR emitters and camera in combination with face recognition
to prove who you are.
21 changes: 21 additions & 0 deletions debian/copyright
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2018 boltgolt

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
47 changes: 47 additions & 0 deletions debian/howdy.1
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
.\" Please adjust this date whenever revising the manpage.
.TH HOWDY 1 "April 9, 2018" "Howdy help" "User Commands"
.SH NAME
howdy \- Windows Hello style authentication for Ubuntu
.SH DESCRIPTION
Howdy IR face recognition implements a PAM module to use your face as a authentication method.
.SS "Usage:"
.IP
howdy [\-U USER] [\-y] [\-h] command [argument]
.SS "Commands:"
.TP
add
Add a new face model for an user.
.TP
clear
Remove all face models for an user.
.TP
config
Open the config file in gedit.
.TP
disable
Disable or enable howdy.
.TP
list
List all saved face models for an user.
.TP
remove
Remove a specific model for an user.
.TP
clear
Remove all face models for an user.
.TP
test
Test the camera and recognition methods.
.SS "Optional arguments:"
.TP
\fB\-U\fR USER, \fB\-\-user\fR USER
Set the user account to use.
.TP
\fB\-y\fR
Skip all questions.
.TP
\fB\-h\fR, \fB\-\-help\fR
Show this help message and exit.
.PP
.SH AUTHOR
Howdy was written by boltgolt. For more information visit https://github.com/Boltgolt/howdy
1 change: 1 addition & 0 deletions debian/howdy.manpages
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
debian/howdy.1
2 changes: 2 additions & 0 deletions debian/install
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
src/. lib/security/howdy
autocomplete/. usr/share/bash-completion/completions
Loading

0 comments on commit e700de7

Please sign in to comment.