Getting SuperUser Authority From Within Running Python Program

Andrew McGregor andrew at
Mon Jan 27 05:18:35 CET 2003

--On Sunday, January 26, 2003 19:50:07 +0000 Tim Daneliuk 
<tundra at> wrote:

> throwaway at wrote:
> <SNIP>
>> what business do non-root users have manipulating
>> root-owned files?
> When the user is, in fact, the sysadmin and wishes temporary access
> to system files for administrative purposes.  Any numebr of
> adminstration programs allow themselves to be invoked from
> a user context of lower permissions and then "login" as the root.

Not really.  Instead, they're launched through a wrapper that runs as root 
and does the authentication check.  You could use the same wrapper, if you 
can find out what it's called and how to use it (I started looking, but 
couldn't find it quickly in my RedHat 8.0).

> ('twander' isn't so much just a file browser as a GUI navigation
> front-end to a more traditional command line shell.)

Ah, well if this is the case then you could pass commands to sudo or 
another such (simple) wrapper, and have it handle the security.

> However, a bit of reading on the resources you and others provided
> convinced me that this is a really terrible idea of scripts.
> Thanks for the help,


More information about the Python-list mailing list