From b3b2adb1d491c5de5020d9ea0bd69b8f9f94505f Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Sun, 16 Jun 2019 01:43:50 -0400 Subject: [PATCH] Fix some bugs and set NOPASSWD --- install.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 5cdad9c..b55343a 100755 --- a/install.sh +++ b/install.sh @@ -290,14 +290,19 @@ echo -n "Setting hostname... " echo "${target_hostname}" | tee ${target}/etc/hostname >&2 echo "done." +echo -n "Setting NOPASSWD for sudo group... " +sed -i 's/^%sudo\tALL=(ALL:ALL) ALL/%sudo\tALL=(ALL:ALL) NOPASSWD: ALL/' ${target}/etc/sudoers +echo "done." + echo -n "Setting /etc/issue generator... " mkdir -p ${target}/etc/network/if-up.d >&2 echo -e "#!/bin/sh IP=\"\$( ip -4 addr show dev ${target_interface} | grep inet | awk '{ print \$2 }' | head -1 )\" -echo \"Debian GNU/Linux 10 \\\\n \\\\l +cat </etc/issue +Debian GNU/Linux 10 \\\\n \\\\l Primary interface IP address: \$IP -\" > /etc/issue" | tee ${target}/etc/network/if-up.d/issue-gen >&2 +EOF" | tee ${target}/etc/network/if-up.d/issue-gen >&2 chmod +x ${target}/etc/network/if-up.d/issue-gen 1>&2 echo "done."