[HELP!] a doubt about entering password in python

Chris Angelico rosuav at gmail.com
Fri Jan 18 01:36:50 EST 2013


On Fri, Jan 18, 2013 at 3:45 PM, Ramchandra Apte <maniandram01 at gmail.com> wrote:
> I think you are correct - su uses some tty magic to stop ECHO and probably doesn't read the password from stdin.

I believe that's right, but the 'sudo' command - at least on my Debian
and Ubuntu systems - accepts a -S parameter to read from stdin instead
of the terminal. Actually, sudo might be better suited to the OP's
task anyway, if it's available.

ChrisA



More information about the Python-list mailing list