Thank you, @chrishamm , for the guidance. I've followed your suggestion to intercept the command directly using dsf-python, and it's working as intended. This approach simplify the process significantly. I appreciate your help!
Posts made by theox
-
RE: ExecOnMcode V0.5, sudo commands are not executed
-
RE: ExecOnMcode V0.5, sudo commands are not executed
Now, I am able to run the program through an SSH connection using my SMT user. However, it still doesn't work when I use the plugin. Can I run the program using the dsf user ? This way, I will be able to see the errors. I tried but couldn't find the password.
-
RE: ExecOnMcode V0.5, sudo commands are not executed
@chrishamm said in ExecOnMcode V0.5, sudo commands are not executed:
/etc/sudoers
Hi again,
Thank you both for your quick responses. I had already adjusted the sudo user permissions as suggested.
Despite following the instructions provided by Falcounet and adjusting the sudo user permissions in /etc/sudoers.d/, I'm still unable to execute commands prefixed with sudo successfully.Here's a simple example to illustrate the problem:
echo hello
However, when I try to execute the command with sudo:sudo echo hello
The command fails to execute.The reason I need to use sudo commands is due to my reliance on the dsf-python library. It seems that running the file without sudo prevents the Raspberry Pi from communicating with the Duet, leading to errors like the one depicted below:
-
ExecOnMcode V0.5, sudo commands are not executed
Re: [ExecOnMcode + 3.4.6](sudo commands are not executed)
Hi there,
I'm encountering an issue with the ExecOnMcode plugin (v0.5) in conjunction with DSF 3.4.6 on my Duet setup (SBC raspberrypi4). Specifically, I'm trying to execute a command using sudo within the plugin to launch a Python script for calibrating different printheads, like so:
sudo python "path/calib.py"
However, it seems that commands starting with sudo aren't being executed properly. When I attempt to run this command, it ends immediately without any error, indicated by a green status.
I attempted to address this by modifying the ExecOnMcode.json file to include the "superUser" permission, but this resulted in unexpected behavior. After restarting duetcontrolserver, the plugin appeared broken, with all commands disappearing and the inability to save new ones.
Has anyone encountered a similar issue or found a workaround for executing sudo commands within the ExecOnMcode plugin successfully? Any insights or suggestions would be greatly appreciated.
Thanks in advance for your help!