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
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
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
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
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)
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).
But this not the right answer
--
http://mail.python.org/mailman/listinfo/python-list
Hi Raghul,
If possible, run your program as root.
Harlin
--
http://mail.python.org/mailman/listinfo/python-list
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