usergen: Do not print password to tty

This commit is contained in:
Xavier Del Campo Romero 2023-05-18 20:02:55 +02:00
parent 9c7a2e9128
commit 83b00b2cda
Signed by: xavi
GPG Key ID: 84FF3612A9BF43F2
1 changed files with 5 additions and 0 deletions

View File

@ -31,8 +31,13 @@ then
exit 1
fi
TTYCFG=$(stty -g)
trap "stty $TTYCFG" INT QUIT TERM EXIT
stty -echo
echo Password: >&2
IFS= read -r PWD
stty echo
echo "Quota, in MiB (leave empty for unlimited quota):" >&2
read -r QUOTA