Re: PQconnectdb question and md5 password

From: Guy Deleeuw <G(dot)De_Leeuw(at)eurofer(dot)be>
To: Marcelo Martins <pglists(at)zeroaccess(dot)org>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: PQconnectdb question and md5 password
Date: 2008-05-06 17:58:48
Message-ID: 48209C58.6020000@eurofer.be
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hello Marcelo,
Thanks for your respons

I have a password and is what I need.
My pg_hba.conf have 'md5' :
host all all 127.0.0.1/32 md5

My question are just how I can connect from the C api with an md5
password or it's not possible ?

Regards
Guy

Marcelo Martins a écrit :
> 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(at)postgresql(dot)org)
>> To make changes to your subscription:
>> http://www.postgresql.org/mailpref/pgsql-admin
>
>

--
Guy De Leeuw
IT Manager
Eurofer
5, avenue Ariane
Building "Integrale" (3rd floor)
1200, Bruxelles
Belgium
Phone : +32 (2) 738 79 40
Mobile : 00 32 498 93 65 00
Fax : +32 (2) 736 28 22
E-Mail : mailto:G(dot)De_Leeuw(at)eurofer(dot)be
www : http://www.eurofer.org

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Marcelo Martins 2008-05-06 18:11:25 Re: PQconnectdb question and md5 password
Previous Message Marcelo Martins 2008-05-06 17:13:39 Re: PQconnectdb question and md5 password