From b567bd848bd561da57fdc7a86e489b2e6d59c998 Mon Sep 17 00:00:00 2001 From: Kieran Hannigan Date: Tue, 30 Jul 2024 18:58:21 +0800 Subject: [PATCH] Allow octoprint user to perform system functions (#3444) --- install/octoprint-install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/install/octoprint-install.sh b/install/octoprint-install.sh index ac9eacfb..878762fa 100644 --- a/install/octoprint-install.sh +++ b/install/octoprint-install.sh @@ -37,6 +37,7 @@ msg_info "Creating user octoprint" useradd -m -s /bin/bash -p $(openssl passwd -1 octoprint) octoprint usermod -aG sudo,tty,dialout octoprint chown -R octoprint:octoprint /opt +echo "octoprint ALL=NOPASSWD: $(command -v systemctl) restart octoprint, $(command -v reboot), $(command -v poweroff)" > /etc/sudoers.d/octoprint msg_ok "Created user octoprint" msg_info "Installing OctoPrint"