summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorAn-Cheng Huang <ancheng@vyatta.com>2007-11-01 17:49:06 -0700
committerAn-Cheng Huang <ancheng@vyatta.com>2007-11-01 17:49:06 -0700
commitcc0b5376c6342f629290e9637e258037a56c0aa6 (patch)
tree8f4fe9f77abf29c61cc9d451411db6a848a072d0 /templates
parentf90d67a966db732f7ae89b361a0f34b351997f87 (diff)
downloadvyatta-cfg-quagga-cc0b5376c6342f629290e9637e258037a56c0aa6.tar.gz
vyatta-cfg-quagga-cc0b5376c6342f629290e9637e258037a56c0aa6.zip
add support for user groups: currently a user can be in either "admin" or
"users" group.
Diffstat (limited to 'templates')
-rw-r--r--templates/system/login/user/node.def3
-rw-r--r--templates/system/login/user/node.tag/group/node.def7
2 files changed, 9 insertions, 1 deletions
diff --git a/templates/system/login/user/node.def b/templates/system/login/user/node.def
index 2070cc95..fbac0c54 100644
--- a/templates/system/login/user/node.def
+++ b/templates/system/login/user/node.def
@@ -8,7 +8,8 @@ end: "if [ -d /tmp/vyatta-delete-system-login-user-$(@).\\\$PPID ]; \
then rm -rf /tmp/vyatta-delete-system-login-user-$(@).\\\$PPID && exit 0; \
fi && \
sudo /opt/vyatta/sbin/vyatta_update_login_user.pl \
- '$(@)' '$(full-name/@)' '$(authentication/encrypted-password/@)'"
+ '$(@)' '$(full-name/@)' '$(authentication/encrypted-password/@)' \
+ '$(group/@)'"
delete: "if [ x$(@) == x ]; then exit 1; fi && \
if [ x$(@) == xroot ]; then \
echo Cannot delete user \"root\" 1>&2 && exit 2; \
diff --git a/templates/system/login/user/node.tag/group/node.def b/templates/system/login/user/node.tag/group/node.def
new file mode 100644
index 00000000..17739351
--- /dev/null
+++ b/templates/system/login/user/node.tag/group/node.def
@@ -0,0 +1,7 @@
+type: txt
+help: "User group"
+default: "admin"
+syntax: $(@) in "admin", "users"; "Users can only be in group \"admin\" or \"users\""
+#comp_help:Possible completions:
+# admin\t\tAdministrators
+# users\t\tNormal users