popen2 + passwd

Radovan Garabik garabik at melkor.dnp.fmph.uniba.sk.spam
Mon May 15 21:41:59 CEST 2000


Jp Calderone <exarkun at flashmail.com> wrote:
 : Can anyone tell me why this doesn't work?

 : import popen2

 : i, o = popen2.popen2('passwd bin')
 : pwd = '12345ASD'
 : o.write(pwd + '\n')
 : o.write(pwd + '\n')
 : i.close()
 : o.close()

 :  Running it through the interpreter yields no output (as it should),
 : but the password for the bin user doesn't change to what I'd expect
 : it to (12345ASD), but to something else.


how do you know it changed to something else?

-- 
 -----------------------------------------------------------
| Radovan Garabik http://melkor.dnp.fmph.uniba.sk/~garabik/ |
| __..--^^^--..__    garabik @ melkor.dnp.fmph.uniba.sk     |
 -----------------------------------------------------------
Antivirus alert: file .signature infected by signature virus.
Hi! I'm a signature virus! Copy me into your signature file to help me spread!



More information about the Python-list mailing list