From d32f1a55cd97b4f416658e6f3ced8ad90309179e Mon Sep 17 00:00:00 2001 From: Roland Date: Wed, 26 Oct 2022 11:20:33 -0600 Subject: [PATCH] Allowing wrolpi user to modify renderd service with sudo without password. --- scripts/install_debian_11.sh | 3 +++ scripts/install_ubuntu_20.04.sh | 3 +++ 2 files changed, 6 insertions(+) diff --git a/scripts/install_debian_11.sh b/scripts/install_debian_11.sh index 63046de0..0abc01cc 100755 --- a/scripts/install_debian_11.sh +++ b/scripts/install_debian_11.sh @@ -42,6 +42,9 @@ chown -R wrolpi:wrolpi /opt/wrolpi # Give WROLPi group a few privileged commands via sudo without password. cat >/etc/sudoers.d/90-wrolpi <<'EOF' %wrolpi ALL=(ALL) NOPASSWD:/usr/bin/nmcli,/usr/bin/cpufreq-set +%wrolpi ALL= NOPASSWD:/usr/bin/systemctl restart renderd.service +%wrolpi ALL= NOPASSWD:/usr/bin/systemctl stop renderd.service +%wrolpi ALL= NOPASSWD:/usr/bin/systemctl start renderd.service EOF chmod 660 /etc/sudoers.d/90-wrolpi # Verify this new file is valid. diff --git a/scripts/install_ubuntu_20.04.sh b/scripts/install_ubuntu_20.04.sh index d685a143..b5973b3e 100755 --- a/scripts/install_ubuntu_20.04.sh +++ b/scripts/install_ubuntu_20.04.sh @@ -45,6 +45,9 @@ chown -R wrolpi:wrolpi /opt/wrolpi # Give WROLPi group a few privileged commands via sudo without password. cat >/etc/sudoers.d/90-wrolpi <<'EOF' %wrolpi ALL=(ALL) NOPASSWD:/usr/bin/nmcli,/usr/bin/cpufreq-set +%wrolpi ALL= NOPASSWD:/usr/bin/systemctl restart renderd.service +%wrolpi ALL= NOPASSWD:/usr/bin/systemctl stop renderd.service +%wrolpi ALL= NOPASSWD:/usr/bin/systemctl start renderd.service EOF chmod 660 /etc/sudoers.d/90-wrolpi # Verify this new file is valid.