On Jan 11, 1:49 am, Noah <[EMAIL PROTECTED]> wrote:
> On Jan 10, 12:59 am, BlackjadeLin <[EMAIL PROTECTED]> wrote:
>
>
>
> > I'm new to python
> > I want to write a simple script to switch user,for example,from user_A
> > to user_B.
> > Thi
On Jan 10, 12:59 am, BlackjadeLin <[EMAIL PROTECTED]> wrote:
> I'm new to python
> I want to write a simple script to switch user,for example,from user_A
> to user_B.
> This my codes:
>
> #!/usr/bin/python
> importpexpect
> import os
> passwd=&quo
I'm new to python
I want to write a simple script to switch user,for example,from user_A
to user_B.
This my codes:
#!/usr/bin/python
import pexpect
import os
passwd="user_B"
child = pexpect.spawn('su user_B')
child.expect('Password:')
child.sendline(passwd)
chi
user and group IDs, not with user and group names.
Hope that helps,
-Nick Vatamaniuc
[EMAIL PROTECTED] wrote:
> hi
>
> due to certain constraints, i will running a python script as root
> inside this script, also due to some constraints, i need to switch user
> to user1 to run the
hi
due to certain constraints, i will running a python script as root
inside this script, also due to some constraints, i need to switch user
to user1 to run the
rest of the script...is there a way ?thanks
--
http://mail.python.org/mailman/listinfo/python-list