pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Scott Dunbar <scott@xigole.com>
To: pgsql-interfaces@postgresql.org
Subject: Newbie confused about pg_hba/md5 and password field in PQsetdbLogin
Date: Wed, 21 Aug 2002 10:59:19 -0600
Message-ID: <3D63C6E7.2030106@xigole.com> (raw)

Hello,
I'm pretty new to PostgreSQL in general and even newer to libpq.  I am 
trying to get a C program working (the authpgsql module in courier-imap) 
that uses PQsetdbLogin().  I've got 7.2.1 installed and running and have 
had no problem accessing it via JDBC.  I have encrypted passwords in 
pg_shadow and have "md5" set for the AUTH_TYPE in pg_hba.conf.  However, 
when using PQsetdbLogin the only way I could get a login to work was to 
use unencrypted passwords in pg_shadow and change pg_hba.conf to use 
"password" instead of "md5" for the database I want access to through 
authpgsql.

Why is this?  Do I somehow have to md5 the clear text password before 
calling PQsetdbLogin()?  Does PQconnectdb() handle this and I should 
update the code?  I feel that the client code should be unaware of the 
over the wire encryption method used and the encryption method of the 
password in pg_shadow but I may be way off base on the underlying issue.

Thanks in advance for any information.





view thread (4+ messages)  latest in thread

Message-ID: <3D63C6E7.2030106@xigole.com>
Permalink:  ../3D63C6E7.2030106@xigole.com/
Also on:    postgresql.org/message-id/3D63C6E7.2030106@xigole.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-interfaces@postgresql.org
  Cc: scott@xigole.com
  Subject: Re: Newbie confused about pg_hba/md5 and password field in PQsetdbLogin
  In-Reply-To: <3D63C6E7.2030106@xigole.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox