X-Original-To: pgsql-php-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 7CA2853432 for ; Fri, 1 Apr 2005 14:33:45 +0100 (BST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 28805-08 for ; Fri, 1 Apr 2005 13:33:44 +0000 (GMT) Received: from wolff.to (wolff.to [66.93.249.74]) by svr1.postgresql.org (Postfix) with SMTP id F1E245342B for ; Fri, 1 Apr 2005 14:33:43 +0100 (BST) Received: (qmail 27083 invoked by uid 500); 1 Apr 2005 13:50:30 -0000 Date: Fri, 1 Apr 2005 07:50:30 -0600 From: Bruno Wolff III To: "Vishal Kashyap @ [SaiHertz]" Cc: Christopher Kings-Lynne , pgsql-php@postgresql.org Subject: Re: PostgreSQL Backup Script Message-ID: <20050401135030.GA26112@wolff.to> Mail-Followup-To: Bruno Wolff III , "Vishal Kashyap @ [SaiHertz]" , Christopher Kings-Lynne , pgsql-php@postgresql.org References: <77b69d2105033120543ca670a7@mail.gmail.com> <424CD58F.3040108@familyhealth.com.au> <77b69d2105033121483ce20e0a@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <77b69d2105033121483ce20e0a@mail.gmail.com> User-Agent: Mutt/1.5.6i X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.011 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200504/6 X-Sequence-Number: 3090 On Fri, Apr 01, 2005 at 11:18:13 +0530, "Vishal Kashyap @ [SaiHertz]" wrote: > > I suggest allowing the 'postgres' user to connect with 'ident sameuser' > > in pg_hba.conf from the localhost only, then always just run pg_dump as > > 'postgres'. > > That means > > # TYPE DATABASE USER IP-ADDRESS IP-MASK METHOD > host localhost 255.255.255.255 > ident sameuser > > only will NOT be asked for password when it does > pg_dump -U > when logged in to its shell account with > and If I run a crontab with user the above lines again stands true. > > > What you say ? Don't do this as a host entry if your OS supports domain sockets with getpeerid. Use a 'local' entry. That way you don't need to run an ident server. You also have the option to set up custom map entries so that the OS user is not the same as the DB user.