pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Marcelo Martins <pglists@zeroaccess.org>
To: Guy Deleeuw <G.De_Leeuw@eurofer.be>
Cc: pgsql-admin@postgresql.org
Subject: Re: PQconnectdb question and  md5 password
Date: Tue, 6 May 2008 12:13:39 -0500
Message-ID: <7A9FA81F-5F0F-4CD0-B42A-AE9CB7B3C941@zeroaccess.org> (raw)
In-Reply-To: <48202DE2.20805@eurofer.be>
References: <48202DE2.20805@eurofer.be>

How do you have your pg_hba.conf file setup ?

If on the shell as the postgres user, you can login into the   
"db_stats" database without a password being asked for than you should  
not need one.
Try out:

postgres$> psql db_stats

and see if you can login without asking for a PW.. check your  
pg_hba.conf first though.


On May 6, 2008, at 5:07 AM, Guy Deleeuw wrote:

> Hello,
>
> I don't know how can I pass a md5 password to the password field ?
> example :
> connInfo = "host=localhost port=5432 dbname=db_stats user=postgres  
> password=secret";
> pConn = PQconnectdb(connInfo);
>
> I try to replace the string 'secret' by the content of /etc/shadow  
> but without succès.
>
> Thanks in advance
>
> Guy
>
> -- 
> Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-admin




view thread (7+ messages)  latest in thread

Message-ID: <7A9FA81F-5F0F-4CD0-B42A-AE9CB7B3C941@zeroaccess.org>
Permalink:  ../7A9FA81F-5F0F-4CD0-B42A-AE9CB7B3C941@zeroaccess.org/
Also on:    postgresql.org/message-id/7A9FA81F-5F0F-4CD0-B42A-AE9CB7B3C941@zeroaccess.org

 · 

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-admin@postgresql.org
  Cc: pglists@zeroaccess.org, G.De_Leeuw@eurofer.be
  Subject: Re: PQconnectdb question and  md5 password
  In-Reply-To: <7A9FA81F-5F0F-4CD0-B42A-AE9CB7B3C941@zeroaccess.org>

* 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