|
|
@@ -302,16 +302,17 @@ if [ "$skip_account_setup" != true ]; then
|
|
|
|
|
|
if command_exists mkpasswd; then
|
|
|
if [ -z "$password" ]; then
|
|
|
- password="$(mkpasswd -m sha512crypt)"
|
|
|
+ password="$(mkpasswd -m sha-512)"
|
|
|
else
|
|
|
- password="$(mkpasswd -m sha512crypt "$password")"
|
|
|
+ password="$(mkpasswd -m sha-512 "$password")"
|
|
|
fi
|
|
|
elif command_exists busybox && busybox mkpasswd --help >/dev/null 2>&1; then
|
|
|
if [ -z "$password" ]; then
|
|
|
- password="$(busybox mkpasswd -m sha512)"
|
|
|
- else
|
|
|
- password="$(busybox mkpasswd -m sha512 "$password")"
|
|
|
+ printf '\n%s' 'Password: ' 1>&2
|
|
|
+ read -rs password
|
|
|
+ echo 1>&2
|
|
|
fi
|
|
|
+ password="$(busybox mkpasswd -m sha512 "$password")"
|
|
|
elif command_exists python3; then
|
|
|
if [ -z "$password" ]; then
|
|
|
password="$(python3 -c 'import crypt, getpass; print(crypt.crypt(getpass.getpass(), crypt.mksalt(crypt.METHOD_SHA512)))')"
|
|
|
@@ -321,7 +322,9 @@ if [ "$skip_account_setup" != true ]; then
|
|
|
else
|
|
|
cleartext_password=true
|
|
|
if [ -z "$password" ]; then
|
|
|
+ printf '\n%s' 'Password: ' 1>&2
|
|
|
read -rs password
|
|
|
+ echo 1>&2
|
|
|
fi
|
|
|
fi
|
|
|
|