[paramiko] su: must be run from a terminal

Eri Ramos Bastos bastos.eri at gmail.com
Mon Nov 9 02:27:41 PST 2009


Thank you, Sergio.

Unfortunately I don't have (nor can have) sudo running on the servers
where I need to run that.
I must use a pure and simple "su".

This code is part of a larger script I'm using to migrate users from a
legacy environment to a new one, with proper tools like sudo
installed.

Thanks, anyway.

[]'s
Eri Ramos Bastos

On Sun, Nov 8, 2009 at 8:13 PM, Sergio Tocalini Joerg
<sergiotocalini at gmail.com> wrote:
> El dom, 08-11-2009 a las 20:47 -0400, Eri Ramos Bastos escribió:
>> Hello, List.
>>
>> I'm trying to run this:  http://pastebin.com/me01a0c4
>>
>> And what I get is:
>>
>> $ ./test.py
>> su: must be run from a terminal
>>
>> I tried to add the line bellow after the connection is established,
>> without luck:
>>
>> client.invoke_shell(term='xterm', width=80, height=24)
>>
>> I get no errors, but nothing returns at the stdout as well.
>>
>> I'm trying to understand how I should be doing it, but since I'm a
>> sysadmin (not a programmer) most of the documentation looks like greek
>> for me.
>>
>> Any hints, please?
>>
>> Regards,
>> Eri Ramos Bastos
>>
>> _______________________________________________
>> paramiko mailing list
>> paramiko at lag.net
>> http://www.lag.net/cgi-bin/mailman/listinfo/paramiko
>
> sorry I don't know if I was answer you question but with this function
> you can rudo commands with sudo and may be it's the same =)
>
> Regards
>
> --
> Larry loves Gentoo (Linux)
>
>  ______________________
> < Have you mooed today? >
>  -----------------------------------
>        \   ^__^
>         \  (oo)\_______
>            (__)\              )\/\
>                   || --------w |
>                   ||             ||
>
> *****************************************
> *****************************************
> * GNU/Linux user #413468
> * blog.sergiotocalini.com.ar
> *****************************************
> * MiWiki (Misiones Wiki)
> * www.miwiki.org.ar
> *****************************************
>
>



More information about the paramiko mailing list