How to use unix_md5_crypt from Perl in Python?

Paul Rubin http
Thu Mar 22 05:17:09 EDT 2007


Nico Grubert <nicogrubert at gmail.com> writes:
> Example:
>    username = 'root at localhost'
>    password = 'root'
> 
> The crypted password is: 'roK20XGbWEsSM'

that looks like you want crypt(3), not md5.  See:

   http://docs.python.org/lib/module-crypt.html

Sample session:

    >>> import crypt
    >>> print crypt.crypt('root','ro')
    roK20XGbWEsSM
    >>> 



More information about the Python-list mailing list