From: | norman <norman_khine(at)yahoo(dot)co(dot)uk> |
---|---|
To: | pgsql-novice(at)postgresql(dot)org |
Subject: | Populate a database with username and generate MD5 hash |
Date: | 2007-11-03 09:46:14 |
Message-ID: | 149757.48108.qm@web26512.mail.ukl.yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
Hello,
I would like to implement Mod_Authn_bdb as per example on Apache web site.
http://httpd.apache.org/docs/2.2/mod/mod_authn_dbd.html#example
...
Has anyone implemented this, how do I design my database schema - I have the following:
auth=# \d
List of relations
Schema | Name | Type | Owner
--------+--------+-------+----------
public | groups | table | postgres
public | log | table | postgres
public | users | table | postgres
(3 rows)
auth=# \d+ users
Table "public.users"
Column | Type | Modifiers | Description
----------+-----------------------+-----------+-------------
username | character(32) | |
pass | text | |
email | character varying(80) | |
Has OIDs: no
auth=# \d+ log
Table "public.log"
Column | Type | Modifiers | Description
--------+--------------------------------+-----------+-------------
uname | character(20) | |
time | timestamp(6) without time zone | |
uri | character varying(512) | |
ip | inet | |
Has OIDs: no
auth=# \d+ groups
Table "public.groups"
Column | Type | Modifiers | Description
----------+---------------+-----------+-------------
username | character(32) | |
memberof | character(64) | |
Has OIDs: no
Now when I try to log into the protected site, I am presented with the login box. I suppose all is working well.
My question, is there a quick way to load the data of usernames, groups, emails, passwords into postgres and also MD5 the password field?
I have followed setting up http://www.koders.com/noncode/fid54A55F93F75759CC524993DFF82D73300B5EE753.aspx?s=md5
But this is the stage now. I was thinking maybe I can write a script that will load the file as CSV and then MD5 the passwords - has anyone got any advice?
Thanks
---------------------------------
For ideas on reducing your carbon footprint visit Yahoo! For Good this month.
From | Date | Subject | |
---|---|---|---|
Next Message | norman | 2007-11-03 09:55:37 | Re: Graphical tools for PostGres |
Previous Message | G. J. Walsh | 2007-11-03 00:13:18 | Uncertain about recoding prepared statements from MySQL to PostgreSQL |