mirror of
https://github.com/captn3m0/Scripts.git
synced 2024-09-20 15:57:23 +00:00
Unlocks desktop using yubikey
This commit is contained in:
parent
1d7c8ec071
commit
5b578f46dc
10
yubi-insert.sh
Executable file
10
yubi-insert.sh
Executable file
@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
YUBIKEY_SERIAL=`cat /home/nemo/.yubikey-serial.txt`
|
||||
DEVICE_SERIAL=`ykinfo -s | cut -d ' ' -f 2`
|
||||
LOGFILE="/home/nemo/logs/auth.log"
|
||||
|
||||
# We only unlock the device if the key matches
|
||||
if [[ "$YUBIKEY_SERIAL"="$DEVICE_SERIAL" ]]; then
|
||||
echo "`date` unlocked using yubkikey" >> $LOGFILE
|
||||
killall i3lock
|
||||
fi
|
Loading…
Reference in New Issue
Block a user