Received: from localhost (unknown [200.46.204.183]) by developer.postgresql.org (Postfix) with ESMTP id 5E8E32E0052 for ; Tue, 6 May 2008 14:59:13 -0300 (ADT) Received: from developer.postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 10544-01 for ; Tue, 6 May 2008 14:59:09 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from BRUBLUmx13.mactelecom.net (BRUBLUmx13.mactelecom.net [217.64.240.20]) by developer.postgresql.org (Postfix) with ESMTP id 48BCE2E004F for ; Tue, 6 May 2008 14:59:10 -0300 (ADT) Received: by BRUBLUmx13.mactelecom.net (Postfix, from userid 505) id 8F8612D11F6; Tue, 6 May 2008 19:59:08 +0200 (CEST) Received: from smtp.eurofer.be (217.64.254.218.mactelecom.net [217.64.254.218]) by BRUBLUmx13.mactelecom.net (Postfix) with ESMTP id 77EC421066A; Tue, 6 May 2008 19:59:07 +0200 (CEST) Received: from [192.168.5.6] by smtp.eurofer.be with esmtp (Exim 4.63) (envelope-from ) id 1JtRRG-0006kB-MK; Tue, 06 May 2008 19:59:07 +0200 Message-ID: <48209C58.6020000@eurofer.be> Date: Tue, 06 May 2008 19:58:48 +0200 From: Guy Deleeuw User-Agent: Thunderbird 2.0.0.12 (X11/20080227) MIME-Version: 1.0 To: Marcelo Martins CC: pgsql-admin@postgresql.org References: <48202DE2.20805@eurofer.be> <7A9FA81F-5F0F-4CD0-B42A-AE9CB7B3C941@zeroaccess.org> In-Reply-To: <7A9FA81F-5F0F-4CD0-B42A-AE9CB7B3C941@zeroaccess.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Spam_score: -3.9 X-SA-Exim-Connect-IP: 192.168.5.6 X-SA-Exim-Mail-From: G.De_Leeuw@eurofer.be Subject: Re: PQconnectdb question and md5 password X-SA-Exim-Scanned: Yes (on smtp.eurofer.be) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200805/41 X-Sequence-Number: 29125 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@postgresql.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.De_Leeuw@eurofer.be www : http://www.eurofer.org