[K12OSN] OT - looking for some scipting help

Paul Lemke lists at paulandmichelle.net
Mon Aug 14 17:54:40 UTC 2006


If you have a central user database why authenticate against that instead?
At my day job I've done dokuwiki against Active Directory so I'm sure you
could do LDAP, or a linux system user directory. 

That would probably be the easiest solution. 

-----Original Message-----
From: k12osn-bounces at redhat.com [mailto:k12osn-bounces at redhat.com] On Behalf
Of Gentgeen
Sent: Monday, August 14, 2006 12:44 PM
To: K12LTSP
Subject: [K12OSN] OT - looking for some scipting help

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

_______________________________________________
K12OSN mailing list
K12OSN at redhat.com
https://www.redhat.com/mailman/listinfo/k12osn
For more info see <http://www.k12os.org>




More information about the K12OSN mailing list