Skip to content

Commit

Permalink
Catch empty enc passphrase before confirmation
Browse files Browse the repository at this point in the history
  • Loading branch information
nbros652 authored Aug 15, 2019
1 parent 0b570ba commit e995071
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion LGMP.sh
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,10 @@ while :
do
echo "Nothing will be displayed as you type passphrases!"
read -sp "Encryption passphrase: " luksPass && echo
[ "$luksPass" == "" ] && echo "Oops, looks like you forgot to provide a passphrase. Try again." && continue
read -sp "Confirm encryption passphrase: " confirm
clear
[ "$luksPass" == "$confirm" ] && [ "$luksPass" == "" ] break
[ "$luksPass" == "$confirm" ] && break
echo "passphrases didn't match or passphrase was blank! Try again"
done
echo -e 'In addition to the passphrase you provided, a keyfile can be generated that can \nalso be used for decryption. It is STRONGLY RECOMMENDED that you create this \nfile and store it in a secure location to be used in the event that you ever \nforget your passphrase!\n'
Expand Down

0 comments on commit e995071

Please sign in to comment.