Becoming root within a Python script
François Pinard
pinard at iro.umontreal.ca
Thu Sep 23 22:55:23 EDT 1999
[Oops, I forgot to Cc: to the mailing list. Siggy, you will read it twice.]
Siggy Brentrup <bsb at baal.infodrom.north.de> écrit:
> > I would like, within a executing Python started as non-root, ask for the
> > root password, and then, continue executing part of the script while
> > being root, becoming the previous again after some sub-job is done.
> > Of course, I can kludge something in, but I would prefer something
> > nice. :-)
> What you are asking for requires suid root scripts, a really bad thing
> modern Unices don't allow any more.
No, I do not want suid root scripts. I would like to acquire root privilege
after having started a non-suid root script as a user, through providing
the root password, somehow. It might be just inescapable to go through
something like `su', but the problem is to find some way so it is reasonably
transparent to the programmer, as seen from within the Python application.
Oh, thanks for replying! :-)
--
François Pinard http://www.iro.umontreal.ca/~pinard
More information about the Python-list
mailing list