Re: generating random passwords ... for a csv file with user details

2006-05-28 Thread Jon Clements
Something like: import csv in_csv=csv.reader( file('your INPUT filenamehere.csv') ) out_csv=csv.writer( file('your OUPUT filenamehere.csv','wb') ) ## If you have a header record on your input file, then out_csv.writerow( in_csv.next() ) ## Iterate over your input file for row in in_csv: # Row

Re: generating random passwords ... for a csv file with user details

2006-05-28 Thread k.i.n.g.
Hi ALL, I am sorry for not mentioning that I am new to python and scripting. How can I add the above script to handle csv file. I want the script to generate passwords in the passwords column/row in a csv file. userid,realname,dateofB,passwd The script should read the userid and genrate the pass

Re: generating random passwords ... for a csv file with user details

2006-05-28 Thread Sybren Stuvel
k.i.n.g. enlightened us with: > 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 Check out the source of pwsafe, it has a great password generator. It can generate with different lengths, based on amoun

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

2006-05-28 Thread Klaus Alexander Seistrup
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 sufficie

Re: generating random passwords ... for a csv file with user details

2006-05-28 Thread andychambers2002
import random def rand_str(len): chars = ''.join(['abcdefghijklmnopqrstuvwxyz', 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', '1234567890', '_+']) # plus whatever additional characters you want return ''.join([random.choice(chars) for i in ran

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

2006-05-28 Thread k.i.n.g.
Hi, 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 I bei