X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 934AD9DC9C6 for ; Mon, 20 Mar 2006 18:45:42 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 95271-03 for ; Mon, 20 Mar 2006 18:45:44 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from wolff.to (wolff.to [66.93.197.194]) by postgresql.org (Postfix) with SMTP id 2B8129DC9C0 for ; Mon, 20 Mar 2006 18:45:40 -0400 (AST) Received: (qmail 9100 invoked by uid 500); 20 Mar 2006 22:47:13 -0000 Date: Mon, 20 Mar 2006 16:47:13 -0600 From: Bruno Wolff III To: "Mr. Dan" , pgsql-admin@postgresql.org Subject: Re: hiding the postgres password - v8.1.0 Message-ID: <20060320224713.GB7291@wolff.to> Mail-Followup-To: Bruno Wolff III , "Mr. Dan" , pgsql-admin@postgresql.org References: <20060320212343.GD15091@surnet.cl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20060320212343.GD15091@surnet.cl> User-Agent: Mutt/1.4.2.1i X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.104 required=5 tests=[AWL=0.104] X-Spam-Score: 0.104 X-Spam-Level: X-Archive-Number: 200603/183 X-Sequence-Number: 20940 On Mon, Mar 20, 2006 at 17:23:43 -0400, Alvaro Herrera wrote: > Mr. Dan wrote: > > > Is there a way to hide or encrypt the postgres password when the postgres > > user is required to be the user in a shell script? This way we could have > > a function called in a program, and the users could do something with out > > actually seeing the postgres user password. > > See the docs for the .pgpass file, in the libpq section (Interfaces). You also might consider using ident authentication if the scripts run on the database server and the OS supports getting the id of who is connected to a domain socket.