Liste des Groupes | Revenir à col misc |
On 2025-05-23 8:26 a.m., The Natural Philosopher wrote:That is actually perfectly fine. I like that it nails everything down to one perfectly useless script to hacker.I have a shell script that monitors hardware stuff - it needs to run asUse sudo to call the script. First, drop a file into /etc/sudoers.d/
root and be called by Apache as user www.
>
Bookworm linux on a Pi4.
>
Its all inside a domestic firewall so security is not a huge issue.
What is the quickest and simplest solution to this?
containing something like the following (untested):
www ALL = (root) NOPASSWD: /path/to/script
That should allow Apache running as www to call 'sudo /path/script' to
run 'script' as root with no password needed. But at the same time, the
www user won't be able to run anything else as root (nor any other user).
Les messages affichés proviennent d'usenet.