summaryrefslogtreecommitdiff
path: root/templates/system/login/user/node.def
blob: 41a7e0483e4268c3deea473ee75e5b156daa2177 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
tag:
type: txt
help: User account information

syntax:expression: exec "/opt/vyatta/sbin/vyatta_check_username.pl $VAR(@)"

commit:expression: $VAR(@) == "" ||
		   $VAR(authentication/plaintext-password) != "" ||
		   $VAR(authentication/plaintext-password/@) = ""

commit:expression: $VAR(@) == "" ||
		   $VAR(authentication/encrypted-password) != "" ||
		   $VAR(authentication/encrypted-password/@) = "!"

end: if [ ${COMMIT_ACTION} != 'DELETE' ] &&
        [ -z "$VAR(authentication/public-keys)" ] &&
        [[ -z "$VAR(authentication/encrypted-password)" ||
              "$VAR(authentication/encrypted-password/@)" = "!" ]]; then
           echo "either user encrypted password or public keys must be set";
           exit 1;
     fi