Bruce Momjian wrote:
>
> Another idea is to add code to 7.1 to convert non-md5 shadow password
> fields to md5 format. Since we already have special handling to do
> pg_pwd, we could do it there. Seems like a plan. MD5 format is all
> hex digits of a specific length. No way to get that confused with a
> real password.
One way to approach it in a semi-transparent way would be to add a
column md5passwd to pg_shadow and set up a trigger to automatically
update it whenever passwd is inserted/updated (and for
security-concious people the same trigger would empty the passwd
field itself, or set it to some special value that disables
crypt/cleartext logins)
the WITH ENCRYPTED PASSWORD would then update md5passwd directly, and
reset the passwd field.
I still think that the easiest way to get unique hashes would be to use
the username as salt when generating the value for md5passwd .
----------------
Hannu