System restart/shutdown buttons don't work

What is the problem?

System commands in OctoPrint menu, installed on OctoPi, doesn't work at all despite spawning a notification stating the operation is succesful.

Octoprint logs mention something about missing terminal

2024-11-23 21:47:02,738 - octoprint.server.api.system - WARNING - Command for core:reboot failed with return code 1:
! 
! STDOUT:
! 
! STDERR:
! sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper
! 
! sudo: a password is required

What did you already try to solve it?

Checked the sudo group, checked the sudoers.d config, tried running the commands manually from ssh (works)

Have you tried running in safe mode?

Yes

Did running in safe mode solve the problem?

No, it didn't

Systeminfo Bundle

octoprint-systeminfo-20241123214811.zip (421.6 KB)

Additional information about your setup

OctoPrint 1.10.3
OctoPi 1.0.0cam (build 2024.11.05.100055)

By default, pi seems to be disabled for NOPASSWD by default?

pi@octopi:~ $ sudo cat /etc/sudoers.d/010_pi-nopasswd
#pi ALL=(ALL) NOPASSWD: ALL

The # has to be renoved.

1 Like