Add passwordless sudo for the user
- 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 <noreply@anthropic.com>
This commit is contained in:
parent
d27a6dd76f
commit
4895b7d733
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user