From: Colin P. Mccabe Date: Mon, 23 Sep 2019 17:53:58 +0000 (-0700) Subject: enc.sh: add password confirmation X-Git-Url: http://www.club.cc.cmu.edu/~cmccabe/cgi-bin/gitweb.cgi?p=cmccabe-bin;a=commitdiff_plain;h=c1316a732ba6d2dea7c73c7c603be523eb6946da enc.sh: add password confirmation --- diff --git a/enc.sh b/enc.sh index de4c2a8..c399a7e 100755 --- a/enc.sh +++ b/enc.sh @@ -7,6 +7,9 @@ die() { if [[ "x${PASS}" = "x" ]]; then read -s -p "enter password: " PASS + echo + read -s -p "re-enter password: " PASS2 + [[ ${PASS} == ${PASS2} ]] || die "The passwords did not match." fi #[ "x${SALT}" = "x" ] && die "you must set SALT to the salt."