Jeff Schwab wrote:
> [EMAIL PROTECTED] wrote:
>> Thanks, that looks very promising...
>> Is there a solution for pre-Python v2.4? I have to have code that works
>> on 2.x, 0<=x<=4. Do I just use the os.popen instead?
>
> import os
>
> def run_as(username):
> pipe = os.popen("su %s" % us
[EMAIL PROTECTED] wrote:
> Thanks, that looks very promising...
> Is there a solution for pre-Python v2.4? I have to have code that works
> on 2.x, 0<=x<=4. Do I just use the os.popen instead?
import os
def run_as(username):
pipe = os.popen("su %s" % username, 'w')
pipe.write("w
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes:
> Greetings-
> This is on Linux... I have a daemon running as root and I want to
> execute another Python program as another user (a regular user). I have
> the name of the user and can use the 'pwd' and 'grp' modules to get
> that user's user and gr
"[EMAIL PROTECTED]" <[EMAIL PROTECTED]> writes:
> This is on Linux... I have a daemon running as root and I want to
> execute another Python program as another user (a regular user). I have
> the name of the user and can use the 'pwd' and 'grp' modules to get
> that user's user and group ids. What
Thanks, that looks very promising...
Is there a solution for pre-Python v2.4? I have to have code that works
on 2.x, 0<=x<=4. Do I just use the os.popen instead?
-Don
--
http://mail.python.org/mailman/listinfo/python-list
[EMAIL PROTECTED] wrote:
> Greetings-
> This is on Linux... I have a daemon running as root and I want to
> execute another Python program as another user (a regular user). I have
> the name of the user and can use the 'pwd' and 'grp' modules to get
> that user's user and group ids. What I don't un