Hello, On Fri, 18 Aug 2017, Paul Groves wrote:
I have come across the situation whereby I need to execute certain commands in my server management web page (written in PHP)
Egads, please DO NOT! There's too much crap like that "out there" (written in PHP and other, but PHP is esp. tricky, IIRC) and just about none got it right. If you need to, use some supported stuff like Plesk etc. (There's free alternatives, IIRC). Those frameworks / management interfaces are bad and unsafe enough. And webmin is not one of them, AFAIK. Doing stuff like this via PHP is _VERY_ complex and difficult, and, as above, almost nobody gets it right. Is that a web page written _by_ you to manage stuff or ...
that can only be run with sudo or as root. For example, adding / editing and removing root crontab entries.
What would be the correct and secure way to do this?
Just don't. Just use ssh! Why nor wrap ssh _locally_ in a nice GUI. There's perl, python, ruby, whatnot, with Tk, QT, GTK, wx, FLTk, etc. as GUIs, all able to do a proper Password-Dialog and starting an SSH-Session (and then stuff)... -dnh -- 172: Internet Das längste Kabel der Welt. (Lutz Frommberger) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org