Best way to gain root privileges

Katie T katie at
Thu Feb 17 20:44:20 CET 2011

On Wed, Feb 16, 2011 at 9:26 PM, GSO <gsowww at> wrote:
> I'm sure this question is as old as time, but what is the best way to
> gain root privileges?  (Am using Python 2.6.5, pygtk2 v2.16, Gtk
> v2.18.9, on RHEL6.)

Running any kind of script sudo'd is a bad idea, it's very very hard
(in many cases impossible) to do securely. Root permissions in general
should only be used for what they're needed for and nothing else (that
means getting the permission, doing the stuff that needs to be done as
root, and then returning back to normal privs), anything else is just
asking for trouble.

The Software Developer Job Board

More information about the Python-list mailing list