Python & Linux, some questions (2)
guettli at thomas-guettler.de
Tue Mar 16 14:30:26 CET 2004
Am Mon, 15 Mar 2004 21:28:47 +0100 schrieb Luca T.:
> So it seems that "su" refuses to work if it is run like this.
> Now, beside "sudo" that i CANNOT use because i don't want to change the
> configuration of the user's comp... any idea about how i could run a
> program as root from inside my python program?
write a little C programm and make it setuid root.
Scripts cannot be setuid.
Be carefull, there are a many things you need to
make it secure. Maybe suexec of apache can be
used as template.
More information about the Python-list