summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/system/login/user/node.tag/authentication/plaintext-password/node.def5
1 files changed, 5 insertions, 0 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 12a74a36..5f1d09ed 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
@@ -4,6 +4,11 @@ help: Plaintext password for encryption
# 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).
+syntax:expression: exec "\
+ if [[ -e /opt/vyatta/etc/.nofirstpasswd && $VAR(@) == 'vyatta' ]]; then \
+ echo 'Invalid password [$VAR(@)]';\
+ exit 1;\
+ fi"
update:expression: $VAR(@) == "" \
|| ($VAR(../encrypted-password/@) \
= `/usr/bin/mkpasswd -H md5 '$VAR(@)' | tr -d \\\\n` \