Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b07OT-0008G3-KC for pgsql-pkg-debian@arkaria.postgresql.org; Tue, 10 May 2016 13:08: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 1b07OT-0007FM-6u for pgsql-pkg-debian@arkaria.postgresql.org; Tue, 10 May 2016 13:08:09 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1b07OS-0007ER-O3 for pgsql-pkg-debian@postgresql.org; Tue, 10 May 2016 13:08:08 +0000 Received: from plane.gmane.org ([80.91.229.3]) by magus.postgresql.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1b07OO-00015C-Lc for pgsql-pkg-debian@postgresql.org; Tue, 10 May 2016 13:08:08 +0000 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1b07ON-0003Z7-5q for pgsql-pkg-debian@postgresql.org; Tue, 10 May 2016 15:08:03 +0200 Received: from s0106503955564c1f.wp.shawcable.net ([24.77.8.70]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 10 May 2016 15:08:03 +0200 Received: from spluque by s0106503955564c1f.wp.shawcable.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 10 May 2016 15:08:03 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: pgsql-pkg-debian@postgresql.org From: Sebastian P. Luque Subject: Re: no password on postgres user and pgagent Date: Tue, 10 May 2016 08:07:36 -0500 Organization: Church of Emacs Lines: 36 Message-ID: <87d1ouvz6v.fsf@otaria.sebmel.org> References: <87r3daopfm.fsf@otaria.sebmel.org> <20160510090828.GA7473@msg.df7cb.de> Mime-Version: 1.0 Content-Type: text/plain X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: s0106503955564c1f.wp.shawcable.net User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) Cancel-Lock: sha1:ZFY4qvAg8KUT6nVfpeGCC+nxIF0= X-Pg-Spam-Score: -3.5 (---) X-Mailing-List: pgsql-pkg-debian List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Precedence: bulk Sender: pgsql-pkg-debian-owner@postgresql.org On Tue, 10 May 2016 11:08:28 +0200, Christoph Berg wrote: > Re: Seb 2016-05-10 <87r3daopfm.fsf@otaria.sebmel.org> >> Hello, >> I'd like to run pgagent with the postgres user, which doesn't have a >> password. I thought it'd be as simple as setting up an init script >> as: >> [ -- Begin >> ---------------------------------------------- ] #! /bin/sh >> pgagent user=postgres host=localhost dbname=postgres > The default pg_hba.conf requires md5 passwords for "host=localhost" > connections. It's actually set to "peer" in my case (v. 9.5): [ -- lines 84 - 85 ------------------------------------------- ] # Database administrative login by Unix domain socket local all postgres peer [ -- End of lines 84 - 85 ------------------------------------ ] which is what I want; i.e. get user name from the operating system user and check that it matches requested database user name. If I understand right, this means that if I sudo or login as postgres, then that's what PostgreSQL gets. If postgres has no password and I can login without one, then the database server shouldn't ask for one. Why does pgagent expect one? Thanks, -- Seb -- Sent via pgsql-pkg-debian mailing list (pgsql-pkg-debian@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-pkg-debian