From 4895b7d73356443eace247cd72a0cdb9247dc9c0 Mon Sep 17 00:00:00 2001 From: Dominik Roth Date: Mon, 18 Aug 2025 21:09:16 +0200 Subject: [PATCH] Add passwordless sudo for the user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Configure NOPASSWD: ALL for the created user - Create proper sudoers.d file with correct permissions - User no longer needs to enter password for sudo commands 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude --- post-install.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/post-install.sh b/post-install.sh index 783b814..639ff92 100755 --- a/post-install.sh +++ b/post-install.sh @@ -80,6 +80,11 @@ chmod 700 /home/${ALMA_USER}/.ssh chmod 600 /home/${ALMA_USER}/.ssh/authorized_keys chown -R ${ALMA_USER}:${ALMA_USER} /home/${ALMA_USER}/.ssh +# Configure passwordless sudo +echo "[+] Configuring passwordless sudo for ${ALMA_USER}..." +echo "${ALMA_USER} ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/99-${ALMA_USER} +chmod 440 /etc/sudoers.d/99-${ALMA_USER} + # Install oh-my-zsh and powerlevel10k echo "[+] Installing oh-my-zsh and powerlevel10k..." # Download and run oh-my-zsh installer as the user with proper environment