MD5 Passwords and the Python MD5 module

davec999 at my-deja.com davec999 at my-deja.com
Thu Mar 30 08:29:18 EST 2000


In article <8buohn$q3b$1 at nnrp1.deja.com>,
cephas_tpg at my-deja.com wrote:
> I was wondering how to use the Python MD5 module
> to create valid passwords for users under redhat
> 6.1.
...
> Any information on how to use Python to produce
> the md5 password hashes, or a way to get around
> it, would be greatly appreciated.
Well, the way to produce valid passwords is using the crypt module.
This is an interface to the crypt library and is exactly the same
routine used to produce passwords by passwd, etc. Usage is along the
lines of:
import crypt
...
password = crypt.crypt(cleartext, seed)
...
"man crypt" to know how it works and what seed is. The module is also
documented in the Python docs.
If I have misunderstood and RH6.1 uses a different system for shadow
passwords then I apologise, but that's how shadow passwords are
calculated in my SuSE 6.3...
Dave


Sent via Deja.com http://www.deja.com/
Before you buy.



More information about the Python-list mailing list