running commands with sudo & python

John Bauman john at baumanfamily.com
Fri Sep 29 05:57:43 CEST 2006


coldsoul4e at googlemail.com wrote:
> Hi!
> I must execute a command with os.command(), but with root permissions.
> Is there anyway to do that with python? 
> Thanks
> 
http://en.wikipedia.org/wiki/Setuid
Of course, it's not generally a good idea to have your program keep root 
permissions after it does whatever it needs to do.



More information about the Python-list mailing list