Giampaolo Rodola' wrote:

> I mainly need to temporarily impersonate another user to
> execute a command and then come back to the original user.

If the script is run as root, you can freely impersonate other users with
the os.seteuid() and os.setegid() methods.

If the script is not run as root (either directly or through sudo, as
suggested by other posters), then perhaps it should be.


Jeffrey
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to