cli: fix default hash in 'do password encrypt'

We could go with the old default sha512crypt, but since the default has
changed to yescrypt, as used by the 'change password' command.  We use
that for consistency.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg
2026-01-22 22:44:13 +01:00
parent c7b409304f
commit 078839d988
+1 -1
View File
@@ -238,7 +238,7 @@
<PARAM name="pwpass" ptype="/STRING" help="Optional clear text password (no spaces)"/>
</SWITCH>
<ACTION sym="script" in="tty" out="tty" interrupt="true">
type=${KLISH_PARAM_pwhash:-sha512}
type=${KLISH_PARAM_pwhash:-yescrypt}
salt=${KLISH_PARAM_pwsalt:+-S $KLISH_PARAM_pwsalt}
mkpasswd -m $type $salt $KLISH_PARAM_pwpass
</ACTION>