Differences in crypt hash?

From: Richard Hodges <rh(at)matriplex(dot)com>
To: pgsql-docs(at)postgresql(dot)org
Subject: Differences in crypt hash?
Date: 2001-08-04 01:41:27
Message-ID: Pine.BSF.4.10.10108031827060.96346-100000@mail.matriplex.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs

Hi all,

I am trying to figure out exactly what is going on with a client
that I have just compiled for Solaris 2.7 I have compiled both
7.0.3 and 7.1.2, and neither gave me any obvious compilation errors,
but I did note these interesting (relevant?) warnings:
UX tsort: INFORM: cycle in data
fe-connect.o
fe-auth.o
UX tsort: INFORM: cycle in data
fe-exec.o
fe-connect.o

My Solaris client uses the three files: libpq-fe.h, postgres_ext.h,
and libpq.a (nothing else).

The problem is that my Solaris client does not authenticate against
my server (7.0.3 built on FreeBSD). I added the following line to
src/backend/libpq/crypt.c, function crypt_verify() for logging:
fprintf(stderr, "crypt_verify: user='%s' pass='%s', crypt='%s'\n",
user, pgpass, crypt_pwd);

When my FreeBSD client connects, this logging prints success:
crypt_verify: user='dtvuser'
pass='$1$hI$eaByHtOxTYKOygT1.JMsU.',
crypt='$1$hI$eaByHtOxTYKOygT1.JMsU.'
crypt_verify: user='dtvuser'
pass='$1$ZH$YGGYInw6oH0P29Ze6hlo.1',
crypt='$1$ZH$YGGYInw6oH0P29Ze6hlo.1'

When my Solaris client tries to connect, the hash is totally wrong:
crypt_verify: user='dtvuser'
pass='lBeX8.2tWJup.',
crypt='$1$lB$ajOq8TJJdUAAyDZcSGDfM.'
crypt_verify: user='dtvuser'
pass='3HW/UXZhFVXhs',
crypt='$1$3H$QzIURSP9F/v/nI5jFwwXn.'

My FreeBSD client is apparently using a salted MD5 hash, where my
Solaris client seems to be just throwing something else.

Is there a configuration item I missed while compiling? Or is there
a run-time option involved?

Thanks for any insight into this!

-Richard

-------------------------------------------
Richard Hodges | Matriplex, inc.
Product Manager | 769 Basque Way
rh(at)matriplex(dot)com | Carson City, NV 89706
775-886-6477 | www.matriplex.com

Responses

Browse pgsql-docs by date

  From Date Subject
Next Message Tom Lane 2001-08-04 17:05:02 Re: Differences in crypt hash?
Previous Message Tom Lane 2001-07-20 16:09:25 Re: trying to get info on sql commands