Change password on Linux
Alvaro Figueiredo
alvarof at freeshell.org
Thu May 22 14:56:59 EDT 2003
Em Qui 22 Mai 2003 14:20, Antonios Christofides escreveu:
> Bo M. Maryniuck wrote:
> > > Does anyone know how to change a Linux password using Python?
> >
> > 1. Tweak /etc/shadow if you're experienced Linux admin
> > 2. os.popen() and passwd command
>
> I don't think you can do it with os.popen(); passwd does not read
> the password from stdin. You can do it with expect or pexpect. If
> you prefer a standard module, you can use telnetlib to telnet
> localhost.
passwd --stdin username
--
Alvaro Figueiredo
alvarof at freeshell.org
More information about the Python-list
mailing list