Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YnW6x-0003qh-Jm for pgsql-bugs@arkaria.postgresql.org; Wed, 29 Apr 2015 17:49:27 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YnW6w-00039h-Dj for pgsql-bugs@arkaria.postgresql.org; Wed, 29 Apr 2015 17:49:26 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YnUMc-0006Fb-LP for pgsql-bugs@postgresql.org; Wed, 29 Apr 2015 15:57:30 +0000 Received: from mail-pa0-x22e.google.com ([2607:f8b0:400e:c03::22e]) by magus.postgresql.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.80) (envelope-from ) id 1YnUMY-0005XK-Mo for pgsql-bugs@postgresql.org; Wed, 29 Apr 2015 15:57:29 +0000 Received: by pabtp1 with SMTP id tp1so31573033pab.2 for ; Wed, 29 Apr 2015 08:57:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type; bh=RaUi15xrzDoIVX+8/FBd+DdUoAX0CahZ8vS+olfeaBY=; b=wfH75qKvaIiV4hDUpR4T5l5s9YFgN1BQz4dupjIomdHGZtOcChzREHopTmDSh2qATL qRgy+hyNtaEYQCKurVzvmMpF7vJe2hTRqSAA1L/AHHZqFCUlspWOplm2YIcxHnSiaMvA JT7b+MT0N+IDuMAVGfVLLZt5QRyXBZAT22CWeAxsO2zysYa0l4gxunK0iY7sHhWP7pKO nx/NDYMvTyvtLz3Sb05G4CpNUDe0rXs3kf62jcaokf5lRc6W0DZ9M+m1zU9fMbXVOv3L cy+ty0laNiYToVBdriahaGHVl8FpwdDfwHxq2FE4GQUrArhi0F7UDyxI6lhqbsPilwon otdg== X-Received: by 10.70.49.35 with SMTP id r3mr23584153pdn.22.1430323044027; Wed, 29 Apr 2015 08:57:24 -0700 (PDT) Received: from [192.168.1.12] (198-48-196-219.cpe.pppoe.ca. [198.48.196.219]) by mx.google.com with ESMTPSA id jd5sm25761200pbd.35.2015.04.29.08.57.21 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 29 Apr 2015 08:57:23 -0700 (PDT) Message-ID: <5540FF5F.80601@gmail.com> Date: Wed, 29 Apr 2015 11:57:19 -0400 From: "bzb.dev001@gmail.com" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: "David G. Johnston" CC: "pgsql-bugs@postgresql.org" Subject: Re: BUG #13188: .pgpass does not work References: <20150428181007.2546.64960@wrigleys.postgresql.org> <5540F428.8000605@gmail.com> In-Reply-To: Content-Type: multipart/alternative; boundary="------------000203080307000808020005" X-Pg-Spam-Score: -2.4 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org This is a multi-part message in MIME format. --------------000203080307000808020005 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit On 2015-04-29 11:50 AM, David G. Johnston wrote: > On Wed, Apr 29, 2015 at 8:09 AM, bzb.dev001@gmail.com > >wrote: > > On 2015-04-29 01:06 AM, David G. Johnston wrote: >> On Tuesday, April 28, 2015, > > wrote: >> >> >> file: ~/.pgpass >> --------------- >> #hostname : port : database : username : password >> * : 5432 : * : postgres : somepassword >> >> >> When I exec psql without specifying the password, I cannot >> login... >> >> $ psql --host=localhost --port=5432 --username=postgres >> --no-password >> psql: fe_sendauth: no password supplied >> >> >> >> I would also remove the padding white space. The syntax is >> documented without and while the documentation is non-specific >> I've personally always avoided it and have never had a problem. > > > ​ And excessive whitespace? > > Have you confirmed that you are able to connect by supplying the > password manually? > > David J.​ > Yes, I have removed the spaces in the .pgpass file. Yes, I can also connect to the postgresql server using a password. I was wondering. I have configured postgresql server to use md5 as specified in the pg_hba.conf below. Do you think that I need to put a md5 encrypted string of my password in the .pgpass file or do I simply put my password in clear text? local all all md5 host all all 127.0.0.1/32 md5 host all all ::1/128 md5 --------------000203080307000808020005 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 8bit
On 2015-04-29 11:50 AM, David G. Johnston wrote:
On Wed, Apr 29, 2015 at 8:09 AM, bzb.dev001@gmail.com <bzb.dev001@gmail.com> wrote:
On 2015-04-29 01:06 AM, David G. Johnston wrote:
On Tuesday, April 28, 2015, <bzb.dev001@gmail.com> wrote:

file: ~/.pgpass
---------------
#hostname : port : database : username : password
* : 5432 : * : postgres : somepassword


When I exec psql without specifying the password, I cannot login...

$ psql --host=localhost --port=5432 --username=postgres --no-password
psql: fe_sendauth: no password supplied



I would also remove the padding white space.  The syntax is documented without and while the documentation is non-specific I've personally always avoided it and have never had a problem.

​ And excessive whitespace?

Have you confirmed that you are able to connect by supplying the password manually?

David J.​
 


Yes, I have removed the spaces in the .pgpass file.
Yes, I can also connect to the postgresql server using a password.
I was wondering.  I have configured postgresql server to use md5 as specified in the pg_hba.conf below.  Do you think that I need to  put a md5 encrypted string of my password in the .pgpass file or do I simply put my password in clear text?

local   all             all                                     md5
host    all             all             127.0.0.1/32            md5
host    all             all             ::1/128                 md5


--------------000203080307000808020005--