summaryrefslogtreecommitdiff
path: root/jessie-arm64-developer
diff options
context:
space:
mode:
authorRicardo Salveti <ricardo.salveti@linaro.org>2015-10-27 18:41:26 -0200
committerFathi Boudra <fathi.boudra@linaro.org>2015-12-03 12:50:44 +0000
commit2a04888ec8eddc4175cf978a6e8ff0831ac7e54e (patch)
tree23574efea013777ae59ef4a97877ea2ec3003913 /jessie-arm64-developer
parent4ab9146ba6b05ebf2cf34d39432b7bea393722d7 (diff)
jessie: 02-add_linaro_to_groups: switch to the sudo group
Change-Id: I868cc00040704ae4c8a518e50b9c2ebd9cd501d7 Signed-off-by: Ricardo Salveti <ricardo.salveti@linaro.org>
Diffstat (limited to 'jessie-arm64-developer')
-rwxr-xr-xjessie-arm64-developer/customization/hooks/02-add_linaro_to_groups.chroot2
-rwxr-xr-xjessie-arm64-developer/customization/hooks/03-check_sudoers_for_admin.chroot22
2 files changed, 12 insertions, 12 deletions
diff --git a/jessie-arm64-developer/customization/hooks/02-add_linaro_to_groups.chroot b/jessie-arm64-developer/customization/hooks/02-add_linaro_to_groups.chroot
index 145bed0..ad43cb7 100755
--- a/jessie-arm64-developer/customization/hooks/02-add_linaro_to_groups.chroot
+++ b/jessie-arm64-developer/customization/hooks/02-add_linaro_to_groups.chroot
@@ -1,6 +1,6 @@
#!/bin/sh -x
-DEFGROUPS="admin,adm,dialout,cdrom,audio,dip,video,plugdev,bluetooth,pulse-access,sudo,systemd-journal,netdev,staff"
+DEFGROUPS="adm,dialout,cdrom,audio,dip,video,plugdev,bluetooth,pulse-access,sudo,systemd-journal,netdev,staff"
IFS=','
for group in $DEFGROUPS; do
diff --git a/jessie-arm64-developer/customization/hooks/03-check_sudoers_for_admin.chroot b/jessie-arm64-developer/customization/hooks/03-check_sudoers_for_admin.chroot
index 5c82429..fe86124 100755
--- a/jessie-arm64-developer/customization/hooks/03-check_sudoers_for_admin.chroot
+++ b/jessie-arm64-developer/customization/hooks/03-check_sudoers_for_admin.chroot
@@ -1,17 +1,17 @@
-#!/bin/sh
+#!/bin/sh
-# check to make sure sudoers file has ref for admin
-ADMINEXISTS="$(awk '$1 == "%admin" { print $1 }' /etc/sudoers)"
-if [ -z "$ADMINEXISTS" ]; then
- # append admin entry to sudoers
- echo "# Members of the admin group may gain root privileges" >> /etc/sudoers
- echo "%admin ALL = (ALL) NOPASSWD: ALL" >> /etc/sudoers
+# check to make sure sudoers file has ref for the sudo group
+SUDOEXISTS="$(awk '$1 == "%sudo" { print $1 }' /etc/sudoers)"
+if [ -z "$SUDOEXISTS" ]; then
+ # append sudo entry to sudoers
+ echo "# Members of the sudo group may gain root privileges" >> /etc/sudoers
+ echo "%sudo ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
fi
-# make sure that NOPASSWD is set for %admin
+# make sure that NOPASSWD is set for %sudo
# expecially in the case that we didn't add it to /etc/sudoers
-# just blow the %admin line away and force it to be NOPASSWD
+# just blow the %sudo line away and force it to be NOPASSWD
sed -i -e '
-/\%admin/ c \
-%admin ALL = (ALL) NOPASSWD: ALL
+/\%sudo/ c \
+%sudo ALL=(ALL) NOPASSWD: ALL
' /etc/sudoers