summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--templates/system/login/user/node.tag/authentication/plaintext-password/node.def5
1 files changed, 2 insertions, 3 deletions
diff --git a/templates/system/login/user/node.tag/authentication/plaintext-password/node.def b/templates/system/login/user/node.tag/authentication/plaintext-password/node.def
index 939ff0bc..87210453 100644
--- a/templates/system/login/user/node.tag/authentication/plaintext-password/node.def
+++ b/templates/system/login/user/node.tag/authentication/plaintext-password/node.def
@@ -1,9 +1,8 @@
type: txt
help: Plaintext password for encryption
# if plaintext is empty, assume this is left-over from blanking the plaintext
-# and do nothing. to set password to empty, user needs to set the
-# "encrypted-password" to an empty string (which actually allows login without
-# password).
+# and do nothing.
+
update:expression: $VAR(@) == "" \
|| ($VAR(../encrypted-password/@) \
= `/usr/bin/mkpasswd --method=sha-512 '$VAR(@)' | tr -d \\\\n` \