[K12OSN] OT - looking for some scipting help

Gentgeen gentgeen at linuxmail.org
Mon Aug 14 17:43:58 UTC 2006


I know this is not LTSP specific, but I figure with the audience,
someone out there has had to do this before, so I thought I would try it
here.

This year, I am setting up a wiki (DokuWiki) as our "teachers toolbox". 
I have everything set, but now I need to add some 100+ teachers to the
authenication file.  And since Doku does not have a "batch" add, I am
hoping I can do it by a script instead of added each one by hand.

I currently have a CSV sheet with all necessary info, except the
password.  The password has to be an md5sum has.

So right now my CSV sheet looks something like this:

username,password,RealName,email,roll
admin,,Admin,ksquire at pavcs.org,admin

I know that "echo -n PASSWORD | md5sum" will output the password to the
command line.

The password and the username will be the same for inital login, so I
just need to get column 1 read to md5sum, and then have that output
written to column 2.  Then repeat until it gets to the end of the file. 
The only spaces in the file would be in the "Real Name" section (if that
helps any).  

the DokuWiki User file uses the same format, except the commas are
colons, but that part I can get :-)

Anyone?  

I thank you in advance for your time.

-- 
http://gentgeen.homelinux.org

#############################################################
 Associate yourself with men of good quality if you esteem    
 your own reputation; for 'tis better to be alone then in bad 
 company.        - George Washington, Rules of Civility




More information about the K12OSN mailing list