Re: [GENERAL] Question on MD5 authentication

2006-10-12 Thread Tom Lane
Wei Weng <[EMAIL PROTECTED]> writes: > (As you can see, all 3 strings are different) > Why the difference? Is there something missing ?? Well, the password is actually supposed to be 'md5'||md5(passwd||user), thus: regression=# select md5('test_passwd' || 'test_user'); md5 ---

Re: [GENERAL] Question on MD5 authentication

2006-10-12 Thread Wei Weng
I think I have found out something suspicious. I used tcpdump to monitor the traffic to and from port 5432, and it seems that the password the client on A sends out to the postmaster on B is "md54570471eccef21ae3c6e43033d8d2f66" While the MD5-ed password stored in system catalog (pg_shadow) is

Re: [GENERAL] Question on MD5 authentication

2006-10-12 Thread Wei Weng
On Thu, 2006-10-12 at 15:50 -0400, Tom Lane wrote: > Wei Weng <[EMAIL PROTECTED]> writes: > > I have the following lines in my pg_hba.conf file. > > hostall all 192.168.1.180 255.255.255.1md5 > > Not relevant to your immediate problem, but: you almost certainly > want 255

Re: [GENERAL] Question on MD5 authentication

2006-10-12 Thread Tom Lane
Wei Weng <[EMAIL PROTECTED]> writes: > I have the following lines in my pg_hba.conf file. > hostall all 192.168.1.180 255.255.255.1md5 Not relevant to your immediate problem, but: you almost certainly want 255.255.255.255 as the netmask here. > psql -h 192.168.1.155 -U t

Re: [GENERAL] Question on MD5 authentication

2006-10-12 Thread Wei Weng
On Thu, 2006-10-12 at 15:38 -0400, Wei Weng wrote: > I am trying to connect to machine A (192.168.1.155) from a different > machine B (192.168.1.180), with password transmitted as a MD5 string. > > > I have the following lines in my pg_hba.conf file. > > hostall all 192.168.1.180