summaryrefslogtreecommitdiff
path: root/templates/system/login/user/node.def
diff options
context:
space:
mode:
authorAn-Cheng Huang <ancheng@sydney.vyatta.com>2007-10-24 10:01:04 -0700
committerAn-Cheng Huang <ancheng@sydney.vyatta.com>2007-10-24 10:01:04 -0700
commit1229e8c6f130c62c42900f424a772d4e9c5e8ef5 (patch)
treea89f7b29d4a7e62c803f3b0306922777681f319a /templates/system/login/user/node.def
parentb1fcb904eab1425d349fd7ab8d65b39c1bfb2e3f (diff)
downloadvyatta-cfg-system-1229e8c6f130c62c42900f424a772d4e9c5e8ef5.tar.gz
vyatta-cfg-system-1229e8c6f130c62c42900f424a772d4e9c5e8ef5.zip
add 'sudo' for 'system' and 'service/ssh' configuration commands.
Diffstat (limited to 'templates/system/login/user/node.def')
-rw-r--r--templates/system/login/user/node.def14
1 files changed, 9 insertions, 5 deletions
diff --git a/templates/system/login/user/node.def b/templates/system/login/user/node.def
index 0d09c4d0..2070cc95 100644
--- a/templates/system/login/user/node.def
+++ b/templates/system/login/user/node.def
@@ -7,11 +7,15 @@ syntax: pattern $(@) "^[a-zA-Z_][a-zA-Z0-9_-]*\\$?$" ; "invalid user name $(@)"
end: "if [ -d /tmp/vyatta-delete-system-login-user-$(@).\\\$PPID ]; \
then rm -rf /tmp/vyatta-delete-system-login-user-$(@).\\\$PPID && exit 0; \
fi && \
-/opt/vyatta/sbin/vyatta_update_login_user.pl \
-'$(@)' '$(full-name/@)' '$(authentication/encrypted-password/@)'"
+sudo /opt/vyatta/sbin/vyatta_update_login_user.pl \
+ '$(@)' '$(full-name/@)' '$(authentication/encrypted-password/@)'"
delete: "if [ x$(@) == x ]; then exit 1; fi && \
-if [ x$(@) == xroot ]; then echo Cannot delete user \"root\" 1>&2 && exit 2; \
+if [ x$(@) == xroot ]; then \
+ echo Cannot delete user \"root\" 1>&2 && exit 2; \
fi && \
if mkdir /tmp/vyatta-delete-system-login-user-$(@).\\\$PPID >& /dev/null; \
-then /opt/vyatta/sbin/vyatta_update_login_user.pl -d '$(@)'; \
-else exit 1; fi"
+then \
+ sudo /opt/vyatta/sbin/vyatta_update_login_user.pl -d '$(@)'; \
+else \
+ exit 1; \
+fi"