diff options
author | An-Cheng Huang <ancheng@vyatta.com> | 2007-12-04 18:47:40 -0800 |
---|---|---|
committer | An-Cheng Huang <ancheng@vyatta.com> | 2007-12-04 18:47:40 -0800 |
commit | 431aad88a4f51ff07148f9768c4e85f9bec32a34 (patch) | |
tree | 5358415ab66107b14770f29acf58e632868a9119 /debian/vyatta-cfg-system.postinst.in | |
parent | 4555c3ed0f6a6256d60ad6a0337984da54cffa00 (diff) | |
download | vyatta-cfg-system-431aad88a4f51ff07148f9768c4e85f9bec32a34.tar.gz vyatta-cfg-system-431aad88a4f51ff07148f9768c4e85f9bec32a34.zip |
add sudo entry for "users" level
Diffstat (limited to 'debian/vyatta-cfg-system.postinst.in')
-rw-r--r-- | debian/vyatta-cfg-system.postinst.in | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/debian/vyatta-cfg-system.postinst.in b/debian/vyatta-cfg-system.postinst.in index a29f3371..e4334699 100644 --- a/debian/vyatta-cfg-system.postinst.in +++ b/debian/vyatta-cfg-system.postinst.in @@ -39,10 +39,19 @@ if [ "$sysconfdir" != "/etc" ]; then # sudoers [ -f /etc/sudoers ] && cp -pf /etc/sudoers /etc/sudoers.vyatta-save + + # for "admin" level (FIXME) sed -i 's/^# %sudo ALL=NOPASSWD: ALL/%sudo ALL=NOPASSWD: ALL/' /etc/sudoers if ! grep -q '^%sudo ALL=NOPASSWD: ALL' /etc/sudoers; then echo -e "\n%sudo ALL=NOPASSWD: ALL" >> /etc/sudoers fi + + # for "users" level + if ! grep -q "^%users ALL=NOPASSWD: ${bindir}/sudo-users/" /etc/sudoers; then + echo -e "\n%users ALL=NOPASSWD: ${bindir}/sudo-users/" >> /etc/sudoers + fi + + # keep env vars echo "Defaults env_keep+=VYATTA_*" >> /etc/sudoers # ssh v1. remove the empty key file |