mirror of
https://github.com/basecamp/omarchy.git
synced 2026-02-17 15:25:37 +00:00
More restrictive sudoless setup for first-run
This commit is contained in:
@@ -3,3 +3,11 @@
|
||||
# Set first-run mode marker so we can install stuff post-installation
|
||||
mkdir -p ~/.local/state/omarchy
|
||||
touch ~/.local/state/omarchy/first-run.mode
|
||||
|
||||
# Setup sudo-less access for first-run
|
||||
sudo tee /etc/sudoers.d/first-run >/dev/null <<EOF
|
||||
$USER ALL=(ALL) NOPASSWD: /usr/bin/ufw
|
||||
$USER ALL=(ALL) NOPASSWD: /usr/bin/ufw-docker
|
||||
$USER ALL=(ALL) NOPASSWD: /bin/rm -f /etc/sudoers.d/first-run
|
||||
EOF
|
||||
sudo chmod 440 /etc/sudoers.d/first-run
|
||||
|
||||
Reference in New Issue
Block a user