Lua Script with os.execute("sudo ...") does not work due to sudo "no new privileges" #9
-
Hi, since I don't know when I cannot shutdown my system with Lua scripts any more. My shutdown Lua script:
The script is executed but in my systemd journal, I get the following error:
This is probably not a mympd issue, but maybe somebody has an idea what to do. Server plattform:
|
Beta Was this translation helpful? Give feedback.
Replies: 0 comments 17 replies
-
This seems to be a regression with the new hardend systemd service unit. Try:
|
Beta Was this translation helpful? Give feedback.
-
The NoNewPrivileges is implied also by user=. The only workaround I know, is to override the complete mympd.service file and add the mympd user manually.
|
Beta Was this translation helpful? Give feedback.
-
If we want to shutdown or reboot our device (RPi for example) how we do it? @jdr85 solution is not an option, IMO. If we can't execute such a simple script i would rather have the choice to sacrifice the security in my isolated(with firewall, etc) LAN and keep the easiness to execute simple tasks. |
Beta Was this translation helpful? Give feedback.
-
Searched around, I found another solution: https://tojaj.com/how-to-turn-off-a-linux-system-without-root-or-sudo/ |
Beta Was this translation helpful? Give feedback.
-
Your suggestions work just fine (new service file under /etc...with the addition of the .conf file) Thank you JC |
Beta Was this translation helpful? Give feedback.
The NoNewPrivileges is implied also by user=.
The only workaround I know, is to override the complete mympd.service file and add the mympd user manually.