summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAn-Cheng Huang <ancheng@vyatta.com>2008-02-04 18:17:06 -0800
committerAn-Cheng Huang <ancheng@vyatta.com>2008-02-04 18:17:06 -0800
commit2ebfcaf09728070b305f41d67a30de45d34413d7 (patch)
tree39f230a3046ae6b0bd9fd2404064921afc6aa8f9
parent492ebed32cf9c08626a4f45fc2aa5e1d90dbad1a (diff)
downloadvyatta-cfg-system-2ebfcaf09728070b305f41d67a30de45d34413d7.tar.gz
vyatta-cfg-system-2ebfcaf09728070b305f41d67a30de45d34413d7.zip
revise the password check
-rw-r--r--templates/system/login/user/node.def3
1 files changed, 2 insertions, 1 deletions
diff --git a/templates/system/login/user/node.def b/templates/system/login/user/node.def
index ea037362..0c1a393d 100644
--- a/templates/system/login/user/node.def
+++ b/templates/system/login/user/node.def
@@ -2,7 +2,8 @@ tag:
type: txt
help: User account information
commit:expression: $VAR(authentication/encrypted-password) != ""
- || $VAR(authentication/plaintext-password) != ""
+ || ($VAR(authentication/plaintext-password) != ""
+ && $VAR(authentication/plaintext-password/@) != "")
; "user password must be specified"
syntax:expression: pattern $VAR(@) "^[a-zA-Z_][a-zA-Z0-9_-]*\\$?$" ; "invalid user name $VAR(@)"
# line continuation and $() expansion are done by cli, not sh.