Skip to content

sudoers file is not correct when username not default pi #864

Description

@araemo

This command in the sudoers file does not appear to be correct anymore.

I recently rebuilt my octopi since my old one was an out of date debian base. The new one is Raspbian 12, and when updating plugins in octoprint, it fails to restart. I tracked it to sudo prompting for password. It seems that octoprint now uses systemctl restart octoprint instead of some variant of /user/sbin/service. Once I changed my sudoers to allow my octoprint user to run systemctl restart octoprint without a password, octoprint was able to restart itself again.

echo "${BASE_USER} ALL=NOPASSWD: /usr/sbin/service" > /etc/sudoers.d/octoprint-service

my new file is:

araemo ALL=NOPASSWD: /usr/bin/systemctl restart octoprint

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions