how to spawn a process under different user

Tim Golden mail at timgolden.me.uk
Thu Jul 2 16:58:03 EDT 2009


sanket wrote:
> Hello All,
> 
> I am trying to use python's subprocess module to launch a process.
> but in order to do that I have to change the user.
> 
> I am not getting any clue how to do that?
> so can anyone please tell me How can I spawn a process under different
> user than currently I am logging in as.

What platform are you on? If you are on Windows,
there was a thread on this subject some time in
the last month. (Short answer: switching user before
launching subprocess won't work; switching within
the subprocess will...)

TJG



More information about the Python-list mailing list