popen2 + passwd

Jp Calderone exarkun at flashmail.com
Mon May 15 00:10:52 EDT 2000


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.

 Thanks in advance,
   Jp

-- 
 12:08am up 12 days, 4:36, 3 users, load average: 0.04, 0.05, 0.06



More information about the Python-list mailing list