Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1soAAh-008lSs-Jr for pgsql-general@arkaria.postgresql.org; Tue, 10 Sep 2024 23:21:20 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1soAAg-004RG8-Ha for pgsql-general@arkaria.postgresql.org; Tue, 10 Sep 2024 23:21:18 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1soAAf-004RF0-JS for pgsql-general@lists.postgresql.org; Tue, 10 Sep 2024 23:21:18 +0000 Received: from [173.162.1.217] (helo=mail.tclc.org) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1soAAc-000XXD-7P for pgsql-general@lists.postgresql.org; Tue, 10 Sep 2024 23:21:16 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.tclc.org (Postfix) with ESMTP id BB277300986 for ; Tue, 10 Sep 2024 16:21:11 -0700 (PDT) Received: from mail.tclc.org ([127.0.0.1]) by localhost (mail.tclc.org [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id c4UP4tbvuNbj for ; Tue, 10 Sep 2024 16:21:11 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by mail.tclc.org (Postfix) with ESMTP id 44F07300C9E for ; Tue, 10 Sep 2024 16:21:11 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.10.3 mail.tclc.org 44F07300C9E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tryx.org; s=dkim.tryx; t=1726010471; bh=i3f2guZ4PEMcfMzln6DWs9yJB7cgSAJgyhcYLLi+f/U=; h=Date:From:To:Message-ID:MIME-Version; b=EnMxCZ4zdf/pipHI9i5pTtNtcnF7Kjbc4EjNLLnzCAlcqrpZ8T5A7t/szucN1BMlh aRzAOZhrHIS5Gn/ZWf0URlFU4wLRJRqBvLFlmJ9KKdS42KHMF5BFHZTHZSOmhmZaY2 nszNGY6vqJo2pnj2IcYqTcBL/h+L80eismFQBK+cQe+hWmgch/WlRz2jHBjv1fpZQU 1zMaR81gKu/hKyqxlgvpRfl8CydDUVqdpKnBoPWUX1mSJjjrkkTUJ11UWiAUlny99E GjJWwRe03LwHPbhXTGkXc7z9LPx037zwYZ1GG1FNvDo4JpqN06Hf+ZVH9iOG+SL4gA mNr4OKIaW3EZA== X-Virus-Scanned: amavisd-new at tclc.org Received: from mail.tclc.org ([127.0.0.1]) by localhost (mail.tclc.org [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id gZzeKwhqjeNv for ; Tue, 10 Sep 2024 16:21:11 -0700 (PDT) Received: from mail.tclc.org (mail.tryx.tclc.org [10.1.1.12]) by mail.tclc.org (Postfix) with ESMTP id 25DFA300986 for ; Tue, 10 Sep 2024 16:21:11 -0700 (PDT) Date: Tue, 10 Sep 2024 16:21:10 -0700 (PDT) From: Chris Miller Reply-To: Chris Miller To: pgsql-general Message-ID: <1738731565.8400.1726010470879.JavaMail.zimbra@tryx.org> In-Reply-To: <172601029329.1028.17318986799853058856@malur.postgresql.org> References: <172601029329.1028.17318986799853058856@malur.postgresql.org> Subject: Re: Test mail for pgsql-general MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="=_a4bb5f30-5549-403d-93c9-5ce8afd32cd8" X-Originating-IP: [10.1.1.12] X-Mailer: Zimbra 8.8.15_GA_4484 (ZimbraWebClient - FF130 (Linux)/8.8.15_GA_4481) Thread-Topic: Test mail for pgsql-general Thread-Index: D8N545cb+M+izwGw1voThwg+hv0VbQ== X-Host-Lookup-Failed: Reverse DNS lookup failed for 173.162.1.217 (failed) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --=_a4bb5f30-5549-403d-93c9-5ce8afd32cd8 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi Folks,=20 I am confused about authentication. I understand that in the local connecti= on case, I have choices of =E2=80=9Cpeer=E2=80=9D, and =E2=80=9Cmd5=E2=80= =9D (password).=20 In pg_hba.conf, I have the lines:=20 local all all peer=20 local all all md5=20 I have an OS user =E2=80=9Cpostgres=E2=80=9D, and I can =E2=80=9Csu =E2=80= =93 postgres=E2=80=9D, which brings me to a shell and I can invoke psql suc= cessfully.=20 I believe that, as root, I should be able to =E2=80=9Cpsql -U postgres -W= =E2=80=9D and logon with a password. I can=E2=80=99t. When I try, I get:=20 psql: error: connection to server on socket "/var/run/postgresql/.s.PGSQL.5= 432" failed: FATAL: Peer authentication failed for user "postgres"=20 Notice I am failing =E2=80=9Cpeer=E2=80=9D authentication. Seems to me that= if I explicitly ask for a password, =E2=80=9C-W=E2=80=9D, I should be usin= g =E2=80=9Cmd5=E2=80=9D authentication.=20 Can anybody straighten me out?=20 Thanks for the help,=20 --=20 Chris.=20 --=_a4bb5f30-5549-403d-93c9-5ce8afd32cd8 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable
Hi Folks,

=

I = am confused about authentication. I understand that in the local connection= case, I have choices of =E2=80=9Cpeer=E2=80=9D, and =E2=80=9Cmd5=E2=80=9D = (password).


In pg_hba.conf, I have the lines:


local all all peer

local all all md5


= I have an OS user =E2=80=9Cpostgres=E2=80=9D, and I can =E2=80=9Csu =E2=80= =93 postgres=E2=80=9D, which brings me to a shell and I can invoke psql suc= cessfully.


I believe that, as root, I should be able to =E2= =80=9Cpsql -U postgres -W=E2=80=9D and logon with a password. I can=E2=80= =99t. When I try, I get:


=

psql: error: c= onnection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: F= ATAL: Peer authentication failed for user "postgres"


<= span style=3D"font-family: Liberation Sans, sans-serif;">Notice I am failin= g =E2=80=9Cpeer=E2=80=9D authentication. Seems to me that if I explicitly a= sk for a password, =E2=80=9C-W=E2=80=9D, I should be using =E2=80=9Cmd5=E2= =80=9D authentication.

Can anybody straighten me out?

<= div data-marker=3D"__SIG_POST__">
T= hanks for the help,
--
Chris.
= --=_a4bb5f30-5549-403d-93c9-5ce8afd32cd8--