run command as other user
Erno Kuusela
erno-news at erno.iki.fi
Tue Jan 23 11:56:06 EST 2001
In article <94jt1i$1evs$1 at news.net.uni-c.dk>, "Peter Posselt
Vestergaard" <posselt at daimi.au.dk> writes:
| Is there some way to run a shell-command from python (on Unix) as another
| user (than the one running the script)?
you can use the os.setuid() function to switch another user id.
be careful though, it is easy to create security holes this way.
-- erno
More information about the Python-list
mailing list