Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c6MzB-0004XN-M3 for pgsql-bugs@arkaria.postgresql.org; Mon, 14 Nov 2016 19:32:09 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1c6MzA-00012e-As for pgsql-bugs@arkaria.postgresql.org; Mon, 14 Nov 2016 19:32:08 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1c6MyV-0000K3-Sw for pgsql-bugs@postgresql.org; Mon, 14 Nov 2016 19:31:28 +0000 Received: from zmcc-5-mx.zmailcloud.com ([192.198.93.228]) by makus.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c6MyT-0006xb-Cy for pgsql-bugs@postgresql.org; Mon, 14 Nov 2016 19:31:26 +0000 Received: from zmcc-5-mta-1.zmailcloud.com (127.37.197.104.bc.googleusercontent.com [104.197.37.127]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by zmcc-5-mx.zmailcloud.com (Postfix) with ESMTPS id 3233952021A for ; Mon, 14 Nov 2016 14:31:24 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by zmcc-5-mta-1.zmailcloud.com (Postfix) with ESMTP id D7A6EC532E for ; Mon, 14 Nov 2016 13:31:23 -0600 (CST) Received: from zmcc-5-mta-1.zmailcloud.com ([127.0.0.1]) by localhost (zmcc-5-mta-1.zmailcloud.com [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id zDWQzcGsOUnN for ; Mon, 14 Nov 2016 13:31:23 -0600 (CST) Received: from localhost (localhost [127.0.0.1]) by zmcc-5-mta-1.zmailcloud.com (Postfix) with ESMTP id 48F4FC531A for ; Mon, 14 Nov 2016 13:31:23 -0600 (CST) X-Virus-Scanned: amavisd-new at zmcc-5-mta-1.zmailcloud.com Received: from zmcc-5-mta-1.zmailcloud.com ([127.0.0.1]) by localhost (zmcc-5-mta-1.zmailcloud.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id XOuazuKCoffz for ; Mon, 14 Nov 2016 13:31:23 -0600 (CST) Received: from redhat.com (unknown [65.158.186.241]) by zmcc-5-mta-1.zmailcloud.com (Postfix) with ESMTPSA id 02733C5325 for ; Mon, 14 Nov 2016 13:31:22 -0600 (CST) To: pgsql-bugs From: Josh Berkus Subject: DOS-style line endings in .pgpass Message-ID: <0de37763-5843-b2cc-855e-5d0e5df25807@agliodbs.com> Date: Mon, 14 Nov 2016 11:31:22 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.6 (--) 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 Version Tested: 9.6.1 Platform: Fedora 24 Docker Base Image Summary: DOS-style line endings (CRLF) cause .pgpass to fail. Steps to Reproduce: 1. Install PostgreSQL 2. Set up user with md5 passwords 3. Create pgpass file using program which makes CRLF line endings, such as Python's CSV module, or windows Notepad. 4. Try to log in 5. Get: psql: FATAL: password authentication failed for user "postgres" password retrieved from file "/var/lib/pgsql/.pgpass" What appears to be happening here is that one of the characters of the CRLF is being appended to the password, making it invalid. Is this a known issue on Windows? Or is this peculiar to Fedora? If it's a general issue, it would be friendly to Windows devs to fix it. -- -- Josh Berkus Red Hat OSAS (any opinions are my own) -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs