An open API service indexing awesome lists of open source software.

https://github.com/folixg/yubikey-windows-lock

Lock your Windows machine when Yubikey is removed
https://github.com/folixg/yubikey-windows-lock

locking screenlock screenlocker windows windows-10 windows-desktop yubico yubikey

Last synced: 9 months ago
JSON representation

Lock your Windows machine when Yubikey is removed

Awesome Lists containing this project

README

          

####################
Yubikey Windows Lock
####################

A script to lock your Windows machine once a formerly connected Yubikey
is removed.

Requirements
============
Needs a Python installation and yubikey-manager which can be installed with

.. code-block:: shell

pip install --user yubikey-manager

Usage
=====

Command Line Options
--------------------

.. code-block::

usage: yubikey_windows_lock.py [-h] [-s SERIAL] [-w WAIT]

Lock Windows when Yubikey is removed

options:
-h, --help show this help message and exit
-s SERIAL, --serial SERIAL
Limit to yubikey with this serial number
-w WAIT, --wait WAIT The time (in s) between two checks (default: 2)

Start At Windows Login
----------------------
An easy way to automatically launch the script on Windows login is to use Windows Task Scheduler.
Create a basic task that is executed on logon and as action starts a program.
In the ``Program/Script`` field provide the path to ``pythonw.exe`` of your Python installation.
Typically that is

.. code-block::

C:\Users\\AppData\Local\Programs\Python\\pythonw.exe

In the ``Add arguments`` field you provide the path to ``yubikey_windows_lock.py`` and optionally the
arguments you want to provide to the script.
So it should look something like

.. code-block::

C:\Users\\\yubikey_windows_lock.py -w 3 -s