Generating random passwords ... for a csv file with user details

Klaus Alexander Seistrup klaus at seistrup.dk
Sun May 28 04:25:19 EDT 2006


Kanthi skrev:

> I have a csv file which in taken as the input file for adding 
> users in my linux mail server with the format
>
> userid,fullname,passwword,dateofbith
>
> Now I have to write a script to generate random password in the
> password field for each user. A simple algorithm is sufficient
> for passwords

#v+

>>> import sha
>>> sha.sha('userid,fullname,passwword,dateofbith').digest().encode('base64')[:10]
'q0nCDQ1YdL'
>>> 

#v-

Mvh, 

-- 
Klaus Alexander Seistrup
SubZeroNet, Copenhagen, Denmark
http://magnetic-ink.dk/



More information about the Python-list mailing list