Salandora / OctoPrint-SystemCommandEditor

This plugin makes System Commands editable through the OctoPrint WebUI
GNU Affero General Public License v3.0
9 stars 9 forks source link

no tty present and no askpass program specified #11

Closed hagelric closed 6 years ago

hagelric commented 6 years ago

I'm trying to execute this command: sudo ./hub-ctrl -h 0 -P 2 -p 0 to disable all USB ports (turn off arduino from raspi)

But i got this error. How can I fix? Command for custom:offarduino failed with return code 1: STDOUT: STDERR: sudo: no tty present and no askpass program specified

Salandora commented 6 years ago

Well you could add the command to the sudoers file. This way you'll not need to give a password, which is completely impossible with the system commands system of octoprint.

DaddyW123 commented 5 years ago

I'm having the same issue. In Sudoers, I;ve tried adding the line in various ways: root ALL=(ALL) NOPASSWD: /home/pi/hub-ctrl pi ALL=(ALL) NOPASSWD: /home/pi/hub-ctrl octouser ALL=... $Users ALL=... ... NOPASSWD: ./hub-ctrl ... NOPASSWD: /home/pi/./hub-ctrl All give me the same results of erroring out using the web link. Any ideas? My thought is that my user for octoprint isn't actually a system user on the pi?