From 0abf7981fcfa9e74cb60903570a7d374568e07cc Mon Sep 17 00:00:00 2001 From: Baltrust Date: Wed, 14 Oct 2026 16:59:31 +0300 Subject: [PATCH] Update after.sh --- after.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/after.sh b/after.sh index 6cde001..2b9d00f 100644 --- a/after.sh +++ b/after.sh @@ -14,12 +14,10 @@ USER_HOME="/home/$USERNAME" # ───────────────────────────────────── # Temporarily enable passwordless sudo # ───────────────────────────────────── - SUDOERS_FILE="/etc/sudoers.d/00_$USERNAME" printf '%s ALL=(ALL:ALL) NOPASSWD: ALL\n' "$USERNAME" > "$SUDOERS_FILE" chmod 440 "$SUDOERS_FILE" - visudo -c || exit 1 # ───────────────────────────────────── @@ -191,10 +189,10 @@ cd "$OLDPWD" && rm -rf grub2 EOF # Restore password requirement after successful installation -printf '%s ALL=(ALL) ALL\n' "$USERNAME" > "$SUDOERS_FILE" -chmod 440 "$SUDOERS_FILE" +rm -f "$SUDOERS_FILE" visudo -c +# Remove the script from root folder after successfull installation rm -f after.sh exit 0 \ No newline at end of file