Skip to main content

Howdy - Face Unlock for Linux


Howdy is a project that can use your built-in IR cameras and IR emitters to provide a Face Recognition Lock system that can be used in all actions that require permission. Be it unlocking the lock screen, or even the sudo command. 

Basically, you add your face profile and it associates your face profile with the Linux user's password. So whenever the kernel has to ask you: "sudo password for <user>:", it will first turn on the IR camera and will try recognizing a face before asking you to type the password. If the face unlock succeeds, it will associate the user found with the user's password and the "sudo password for <user>:" message will be automatically skipped. If it fails, well, it's just like your phone then.

Now associating the face with a user and their password might seem unsafe to you but it's not really any vulnerability in your system per se. The howdy project is basically a pluggable authentication module, which means that it is independent of the underlying authentication scheme of Linux. All it ever does is associates a face with a Linux user. To the scheme, only the information about the Linux user is fed, not the face or the password (it has no way to actually know the password). 

Of course, having said this, it must be pointed out that since you're using a face recognition system using your desktop's built-in camera, the quality of the image is in no way as accurate, and thus, the authentication system is not that secure. By the project's README's own admission:

This package 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. Howdy is a more quick and convenient way of logging in, not a more secure one.
So when should you use Howdy?

When you just want a faster, cooler way to login. You shouldn't use Howdy when there are people around you who could misuse your PC or its data and having a password in your desktop is truly a matter of grave security.

Does it make the login faster?

I would say it's easier, not necessarily faster. There are 3 modes in which Howdy can operate: fast, balanced, secure. With increasing order of security and depth in face recognition techniques, and also time taken to recognize the face and unlock the device, you have the option to choose your security. Choosing secure does not negate the info in the previous answer. It's comparatively secure. I have chosen the balanced mode as my setting, and when I am in a well-lit area, the recognition system works really well. However, otherwise, it first spends approximately 2-3 seconds trying to scan the face (as it should), and outputs face recognition timeout reached and then I can enter the password in case of sudo. In case of lock screen, I can type my password in under 1/1.5 seconds. So 2-3 seconds is a waste of time for me even though I can type the password parallely while the program is trying to scan my face. 

I must say, however, that I use a Dell Inspiron 15 7560 model of my laptop and if you have seen this device, it has a very bad position of the webcam. So even in decent/average lighting, there are high chances of failure. If it weren't for my laziness to type even 8 characters into the PC for unlock or for overriding permissions, I wouldn't be using the project at all. 

Notice the camera position
If your room is well-lit, and/or your PC has decent speed, you can go for adding Face Recognition in your Linux distro!

Tips for pitfalls:

While installing Howdy, there are chances you might run into the following troubles:

- pip

Traceback (most recent call last):
  File "/usr/bin/pip3", line 9, in <module>
    from pip import main
ImportError: cannot import name 'main'

Solution:  

sudo pip install pip --upgrade

sudo python3 -m pip uninstall pip && sudo apt install python3-pip --reinstall

If you use any other solution, make sure you are actually updating or modifying the pip version that is being used in installing the Howdy program. A mistake that I made was that I was just changing pip and and not pip3. 

- update and upgrade:

Make sure you run apt-get update and apt-get upgrade before installing Howdy.

All the best! Hope you have fun.

Comments

Popular posts from this blog

Namaste JavaScript Quick Notes

Note:  Akshay Saini's Namaste JavaScript is probably the best course for JavaScript developers out there. These are my personal notes that I made while watching the course; they serve more of as an online quick reference for my understanding and revision, and I hope it benefits anyone reading it too! Everything in JS happens inside an Execution Context. Before a JS code is run, memory is allocated and variables are set as undefined   , and functions are set as their exact code in the scope within the Execution Context. The global execution context hosts all the global variables and function definitions. An Execution Context has 2 components: Memory, that stores variables and functions; and Code, that reads and executes the code. Call Stack maintains the order of execution contexts. Since JS is single threaded and asynchronous, at one point of time, only one function is executed which is at the top of the call stack. For each function, an execution context is created before executi

i3wm essentials - I (Brightness)

So you have started using i3 and somehow managed to open your browser and almost resumed your normal work.  But wait, the brightness is too much isn't it? Or is it too low? The mousepad used to work fine, but now all of a sudden tapping does not equal click?!  Don't worry.  This blog series will tell you all about the essential setup commands and common shortcuts that I use to navigate my work in i3, and how you can too. Changing the brightness So you just started i3 and you just can't take this brightness setting. You go for your function keys, and damn! They aren't working. Quick fix: Run the following command if you need to change the brightness ASAP. xrandr -q | grep ' connected' | head -n 1 | cut -d ' ' -f1 This will give an ouput that's the name of your monitor.  Use that monitor name here and change the values of brightness to suit your needs. xrandr --output <monitor-name> --brightness 0.7 Now that your eyes are comfortable, let me show

"Hey Google" get me a new T-shirt

Everyone loves Google for its amazing technology and creative workspaces! Guess what? Google loves its developers as much as the world loves it too! And yeah, you don't need to be an amazing programmer to be a developer in Google's community. All you need to do is to spare 30 minutes, just once, and maybe have some creativity! That's it! Oh, and you should be really checking your mails periodically, although if you don't currently have this habit, your excitement would develop that for you. What do we want? So you arrived here to know about getting a T-shirt. Would you also like having a Google Home ? Yup, that is also something you could get through this. And of course, as I mentioned earlier, an entry to Google's Developers Community Program! There're a lot of perks for it but let's first talk business. What do we have to do? In a nutshell: Make an Action for Google Assistant .  But what's an Action ? Action is a feature, or a sub-applicat