Issue with shutdown from the web interface

Happy new year everybody,

following the faq: https://www.repetier-server.de/faq/upgrade-to-our-latest-pi-image/ I've set up a new image using Debian Bookworm Raspi-image 64 bit and the latest Repetier-Server-1.4.15-Linux.deb (not the Raspi image).

Everything as expected, backing up and restore /var/lib worked like a charme.

However there is a small issue with the server shutdown now using the corresponding command in the web-ui: "Shutdown Server": It turned out that the server ignores the request. From ssh requesting the service status, I saw the message below.
pi@repetier:~ $ sudo service RepetierServer status
● RepetierServer.service - Repetier-Server 3D Printer Server
Loaded: loaded (/lib/systemd/system/RepetierServer.service; enabled; preset: enabled)
Active: active (running) since Sun 2024-01-07 21:22:09 CET; 1h 27min ago
Main PID: 659 (RepetierServer)
Tasks: 22
CPU: 1min 48.994s
CGroup: /system.slice/RepetierServer.service
└─659 /usr/local/Repetier-Server/bin/RepetierServer -c /usr/local/Repetier-Server/etc/RepetierServer.xml --daemon

Jan 07 21:22:08 repetier systemd[1]: Starting RepetierServer.service - Repetier-Server 3D Printer Server...
Jan 07 21:22:09 repetier systemd[1]: Started RepetierServer.service - Repetier-Server 3D Printer Server.
Jan 07 22:49:25 repetier sudo[3945]: pam_unix(sudo:auth): conversation failed
Jan 07 22:49:25 repetier sudo[3945]: pam_unix(sudo:auth): auth could not identify password for [repetierserver]
Jan 07 22:49:25 repetier sudo[3945]: repetierserver : command not allowed ; PWD=/ ; USER=root ; COMMAND=/sbin/shutdown -h now
pi@repetier:~ $
What may I change to have the command working as expected?

Here's the command entry from /var/lib/Repetier-Server/database/extcommands.xml (without icon CData)
<command>
<name>Shutdown Server</name>
<icon>...</icon>
<execute>sudo /sbin/shutdown -h now</execute>
<confirm>Really shut down the server?</confirm>
<!-- Define if command should show up in local printer interface, default true.-->
<local>true</local>
<!-- Define if command should show up in remote printer interface, default true.-->
<remote>true</remote>
<!-- Define if command should show up only for users with print permission, default true.-->
<print-permission>true</print-permission>
<!-- Define if command should show up only for users with add files permission, default false.-->
<add-permission>true</add-permission>
<!-- Define if command should show up only for users with del files permission, default false.-->
<del-permission>true</del-permission>
<!-- Define if command should show up only for users with configuration permission, default false.-->
<config-permission>true</config-permission>
</command>
Thank you in advance.

Best regards,
Gerald


Comments

  • You need to add /sbin/shutdown to the sudoer list for user repetierserver so that user can execute sudo for that command without asking for password. See manual documentation where the file is described.
Sign In or Register to comment.