Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hlfzF-0001gn-HM for pgsql-hackers@arkaria.postgresql.org; Thu, 11 Jul 2019 20:48:17 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hlfzD-00076O-Je for pgsql-hackers@arkaria.postgresql.org; Thu, 11 Jul 2019 20:48:15 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hlfzD-00074A-7F for pgsql-hackers@lists.postgresql.org; Thu, 11 Jul 2019 20:48:15 +0000 Received: from xvm-110-146.dc2.ghst.net ([46.226.110.146] helo=fetter.org) by makus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hlfzA-0004iZ-Kl; Thu, 11 Jul 2019 20:48:14 +0000 Received: by fetter.org (Postfix, from userid 1001) id 39508409D0; Thu, 11 Jul 2019 22:48:10 +0200 (CEST) Date: Thu, 11 Jul 2019 22:48:09 +0200 From: David Fetter To: Julien Rouhaud Cc: Peter Eisentraut , pgsql-hackers , Noah Misch , Magnus Hagander , "Jonathan S. Katz" Subject: Re: initdb recommendations Message-ID: <20190711204809.GP24679@fetter.org> References: <20190406180839.GA1921989@rfd.leadboat.com> <96389374-9454-d26d-6f79-7c7b15ec14bd@2ndquadrant.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Thu, Jul 11, 2019 at 09:34:25PM +0200, Julien Rouhaud wrote: > On Tue, Jun 18, 2019 at 10:33 PM Peter Eisentraut > wrote: > > > > On 2019-05-23 18:54, Peter Eisentraut wrote: > > > To recap, the idea here was to change the default authentication methods > > > that initdb sets up, in place of "trust". > > > > > > I think the ideal scenario would be to use "peer" for local and some > > > appropriate password method (being discussed elsewhere) for host. > > I'm also personally all for that change. > > > Patch for that attached. > > Patch applies and compiles cleanly, same for documentation. The > change works as intended, so I don't have much to say. > > > Note that with this change, running initdb without arguments will now > > error on those platforms: You need to supply either a password or select > > a different default authentication method. > > Should we make this explicitly stated in the documentation? As a > reference, it's saying: > > The default client authentication setup is such that users can connect > over the Unix-domain socket to the same database user name as their > operating system user names (on operating systems that support this, > which are most modern Unix-like systems, but not Windows) It turns out that really recent versions of Windows do have it. https://bsmadhu.wordpress.com/2018/08/22/unix-domain-socket-support-in-windows/ Not that this is relevant, or will be, for another couple of years... Best, David. -- David Fetter http://fetter.org/ Phone: +1 415 235 3778 Remember to vote! Consider donating to Postgres: http://www.postgresql.org/about/donate