Re: logging as root using python script

2005-04-08 Thread Paul Casteels
Raghul wrote: Hi Is it possible to login as a root in linux using python script? What I need is when I execute a script it should login as root and execute my command and logout from root to my existing account. IS is possible? Thanx in advance. Hi, You can compile the small .c program and setu

Re: logging as root using python script

2005-04-07 Thread [EMAIL PROTECTED]
use the program called 'expect' it can be called via python. you can build a script using the 'autoexpect' tool. http://www.linuxjournal.com/article/3065 cheers Raghul wrote: > Hi >Is it possible to login as a root in linux using python script? > What I need is when I execute a script it shou

Re: logging as root using python script

2005-04-07 Thread max . derkachev
Unixish system won't let You execute a setuid script with the setuid privileges. Only real machine code can be executed so. But of course, there are workarounds. When, say, you have a perl script with setuid bit set, and sperl (setuid root perl) is installed, the perl interpreter choses sperl to i

Re: logging as root using python script

2005-04-07 Thread Luis Bruno
Martin Franklin wrote: > another alternative would be setuid I also thought about making the script setuid root, but I'm under the impression that Linux (at least) won't honor the suid bit on a script. That's from memory though. Cheers! -- http://mail.python.org/mailman/listinfo/python-list

Re: logging as root using python script

2005-04-07 Thread Martin Franklin
Luis Bruno wrote: Raghul wrote: What I need is when I execute a script it should login as root and execute my command and logout from root to my existing account. I'm not sure of what you need, so I'll assume your *whole* .py script needs root priviledges. In this case, you can configure sudo(8)

Re: logging as root using python script

2005-04-07 Thread Luis Bruno
Raghul wrote: > What I need is when I execute a script it should login as root and > execute my command and logout from root to my existing account. I'm not sure of what you need, so I'll assume your *whole* .py script needs root priviledges. In this case, you can configure sudo(8) or use su(1).

Re: logging as root using python script

2005-04-07 Thread Raghul
But this not the right answer -- http://mail.python.org/mailman/listinfo/python-list

Re: logging as root using python script

2005-04-06 Thread Harlin Seritt
Hi Raghul, If possible, run your program as root. Harlin -- http://mail.python.org/mailman/listinfo/python-list

logging as root using python script

2005-04-06 Thread Raghul
Hi Is it possible to login as a root in linux using python script? What I need is when I execute a script it should login as root and execute my command and logout from root to my existing account. IS is possible? Thanx in advance. -- http://mail.python.org/mailman/listinfo/python-list