summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to 'templates')
-rw-r--r--templates/system/login/user/node.tag/authentication/encrypted-password/node.def3
-rw-r--r--templates/system/login/user/node.tag/authentication/public-keys/node.def4
2 files changed, 7 insertions, 0 deletions
diff --git a/templates/system/login/user/node.tag/authentication/encrypted-password/node.def b/templates/system/login/user/node.tag/authentication/encrypted-password/node.def
index 29ad14a8..a8b3ee54 100644
--- a/templates/system/login/user/node.tag/authentication/encrypted-password/node.def
+++ b/templates/system/login/user/node.tag/authentication/encrypted-password/node.def
@@ -9,3 +9,6 @@ syntax:expression: ($VAR(@) == "*" || $VAR(@) == "!" \
|| ( pattern $VAR(@) "^\\$5\\$[a-zA-Z0-9\./]*\\$[a-zA-Z0-9\./]{43}$" ) \
|| ( pattern $VAR(@) "^\\$6\\$[a-zA-Z0-9\./]*\\$[a-zA-Z0-9\./]{86}$" )) \
; "Not a valid encrypted password for user $VAR(../../@)"
+
+delete:expression: $VAR(../public-keys) != ""
+ ; "either user encrypted password or public keys must be set" \ No newline at end of file
diff --git a/templates/system/login/user/node.tag/authentication/public-keys/node.def b/templates/system/login/user/node.tag/authentication/public-keys/node.def
index 245e7197..d813fb9e 100644
--- a/templates/system/login/user/node.tag/authentication/public-keys/node.def
+++ b/templates/system/login/user/node.tag/authentication/public-keys/node.def
@@ -7,3 +7,7 @@ commit:expression: $VAR(./type/) != "" ; \
"Must configure public key type for $VAR(@)"
commit:expression: $VAR(./key/) != "" ; \
"Must configure public key value for $VAR(@)"
+
+delete:expression: ($VAR(../encrypted-password) != "" &&
+ $VAR(../encrypted-password/@) != "!")
+ ; "either user encrypted password or public keys must be set" \ No newline at end of file