Python & Linux, some questions (2)

Thomas Guettler guettli at thomas-guettler.de
Tue Mar 16 08:30:26 EST 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?

Hi,

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.

HTH, 
 Thomas




More information about the Python-list mailing list