On Tuesday 06 June 2006 23:49, Leticia Larrosa wrote:
> I want generate a shell script and run it as root in the local system from
> a zope3 application.
> For example I want to save a file with the following content:
> #! /bin/sh
> ls
> I want to open this file and run the content as the root user.
> Any idea?

Use Python popen or popen3. It allows you to execute shell comands. As the 
other response suggests, you can use "sudo" or "su" to become root.

Having said that, I caution you that this could open a huge security hole.

Stephan Richter
CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
Zope3-users mailing list

Reply via email to