pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Brett Parker <iDunno@sommitrealweird.co.uk>
To: pgsql-admin@postgresql.org
Subject: Re: Why pg_dump 'trust' authentication fails under root and works under another user?
Date: Thu, 24 Mar 2011 09:52:11 +0000
Message-ID: <20110324095211.GB5521@sommitrealweird.co.uk> (raw)
In-Reply-To: <AANLkTindQcU+LEoVOfkn2-AtTE=8fzPS746RTDdQDuNS@mail.gmail.com>
References: <AANLkTikR5sO5zYYRpNOTLUS+jUdrJKUT-vPTMgm4b88=@mail.gmail.com>
	<4D8AFABB.1010002@lelarge.info>
	<AANLkTimOCKtEDALf+TtRUTk+JAjsgRShJb0GA90v5F3p@mail.gmail.com>
	<4D8B0758.8020707@lelarge.info>
	<AANLkTi=VQQiODWtE7P8mWLiG6M5KswidQiMFZa+P8T=c@mail.gmail.com>
	<4D8B0E9B.9050206@lelarge.info>
	<AANLkTindQcU+LEoVOfkn2-AtTE=8fzPS746RTDdQDuNS@mail.gmail.com>

On 24 Mar 10:39, Jaroslav Záruba wrote:
> The command line is still the same, when executed under one user it does not
> ask for password, when executed under another (root that is) it does:
> pg_dump --ignore-version --host=localhost --port=5432 --username=postgres
> --file="$BACKUP_FILE" --format=p --column-inserts --encoding=UTF-8 db123

If you *really* want root to be able to login to the database as the
postgres user using ident authentication, then you're going to need to
add a line to pg_hba.conf using an ident map, then in the ident map
you're going to have to allow root to map to postgres.

root, per default, does not have a user in postgres. Run your script as
the postgres user if you *really* want super user access.

Thanks,
-- 
Brett Parker                     http://www.sommitrealweird.co.uk/
PGP Fingerprint 1A9E C066 EDEE 6746 36CB  BD7F 479E C24F 95C7 1D61



view thread (11+ messages)  latest in thread

Message-ID: <20110324095211.GB5521@sommitrealweird.co.uk>
Permalink:  ../20110324095211.GB5521@sommitrealweird.co.uk/
Also on:    postgresql.org/message-id/20110324095211.GB5521@sommitrealweird.co.uk

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-admin@postgresql.org
  Cc: iDunno@sommitrealweird.co.uk
  Subject: Re: Why pg_dump 'trust' authentication fails under root and works under another user?
  In-Reply-To: <20110324095211.GB5521@sommitrealweird.co.uk>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox