From cedb09cb6911f5c94d0571a83ebc0377b1cff286 Mon Sep 17 00:00:00 2001 From: CyberLeo Date: Fri, 28 Sep 2012 09:06:52 -0500 Subject: [PATCH] j/seeds/debian: adjust sudoers patch to be less obscure --- seeds/debian.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/seeds/debian.sh b/seeds/debian.sh index c9c2914..5f83b7a 100644 --- a/seeds/debian.sh +++ b/seeds/debian.sh @@ -61,7 +61,13 @@ EOF chmod 755 "${jroot}/etc/rcJ.d/S00localegen" echo "Adding user" -printf '$a\n%%sudo ALL=(ALL) NOPASSWD: ALL' | ed "${jroot}/etc/sudoers" +ed "${jroot}/etc/sudoers" <<"EOF" +H +$a +%sudo ALL=(ALL) NOPASSWD: ALL +. +w +EOF user="${ORIG_USER}" uid="$(id -u "${ORIG_USER}")" [ "${user}" -a "${uid}" ] || { echo "Cannot add nonexistent user"; false; } -- 2.42.0