Skip to content

Commit

Permalink
Make the passphrase prompt configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
cornelinux committed May 15, 2017
1 parent 43d47d2 commit 61a682d
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ info:
@echo "ppa-dev - upload to ppa launchpad. Development"
@echo "ppa - upload to ppa launchpad. Stable"

VERSION=0.4
VERSION=0.4.1
SRC_DIR = yubikey_luks.orig

debianize:
Expand Down
14 changes: 12 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,6 @@ You can now assign the Yubikey to a slot using the tool

yubikey-luks-enroll

Note: The partition is hardcoded in yubikey-luks-enroll. You might need to change this!

Technically this is done by writing the response to your password (1st factor
knowlege) created by the Yubikey (2nd factor possession) to a key slot.

Expand All @@ -45,6 +43,18 @@ this:
bd438575f4e8df965c80363f8aa6fe1debbe9ea9
it can be used as normal password.

Changing the welcome text
-------------------------

If you want to change the welcome text a.k.a. the passphrase prompt you can edit
the file /etc/ykluks.cfg.

After changing this file, you need to run

update-initramfs -u

so that the changes get transferred to the initramfs.

Manage several Yubikeys and Machines
------------------------------------

Expand Down
6 changes: 6 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
yubikey-luks (0.4.1-1) trusty; urgency=low

* Make the passphrase welcome text configurable in /etc/ykluks.cfg

-- Cornelius Kölbel <cornelius.koelbel@netknights.it> Mon, 15 Mar 2017 12:49:00 +0200

yubikey-luks (0.4-1) trusty; urgency=low

* Fix typo in program name
Expand Down
1 change: 1 addition & 0 deletions debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ override_dh_install:
install -D -o root -g root -m755 key-script debian/yubikey-luks/usr/share/yubikey-luks/ykluks-keyscript
install -D -o root -g root -m755 yubikey-luks-enroll debian/yubikey-luks/usr/bin/yubikey-luks-enroll
install -D -o root -g root -m644 yubikey-luks-enroll.1 debian/yubikey-luks/usr/man/man1/yubikey-luks-enroll.1
install -D -o root -g root -m644 ykluks.cfg debian/yubikey-luks/etc/ykluks.cfg
1 change: 1 addition & 0 deletions hook
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,5 @@ esac

copy_exec /usr/bin/ykchalresp
cp /usr/share/yubikey-luks/ykluks-keyscript "${DESTDIR}/sbin/ykluks-keyscript"
cp /etc/ykluks.cfg "${DESTDIR}/etc/ykluks.cfg"
exit 0
7 changes: 6 additions & 1 deletion key-script
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
# This is /sbin/ykluks-keyscript, which gets called when unlocking the disk
#
set -e
. /etc/ykluks.cfg

if [ -z "$WELCOME_TEXT" ]; then
WELCOME_TEXT="Please insert yubikey and press enter or enter a valid passphrase"
fi

message()
{
Expand Down Expand Up @@ -34,7 +39,7 @@ if [ -z "$cryptkeyscript" ]; then
fi
fi

PW="$($cryptkeyscript "Please insert yubikey and press enter or enter a valid passphrase")"
PW="$($cryptkeyscript "$WELCOME_TEXT")"

if check_yubikey_present; then
message "Accessing yubikey..."
Expand Down
3 changes: 3 additions & 0 deletions ykluks.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# If you change this file, you need to run
# update-initramfs -u
WELCOME_TEXT="Please insert yubikey and press enter or enter a valid passphrase"

0 comments on commit 61a682d

Please sign in to comment.