pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Guillaume Lelarge <guillaume@lelarge.info>
To: Jaroslav Záruba <jaroslav.zaruba@gmail.com>
Cc: PostgreSQL - mailing list <pgsql-admin@postgresql.org>
Subject: Re: Why pg_dump 'trust' authentication fails under root and works under another user?
Date: Thu, 24 Mar 2011 11:25:13 +0100
Message-ID: <4D8B1C09.4050609@lelarge.info> (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>

Le 24/03/2011 10:39, Jaroslav Záruba a écrit :
> 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
> 

The "--host=localhost" option says you're using TCP/IP connection (so
the "host lines" of pg_hba.conf), so it's asking for md5 authentication.
Hence the password.

If one user is not asked for a password, it could be that this user has
a .pgpass file telling pg_dump which password to use.


-- 
Guillaume
 http://www.postgresql.fr
 http://dalibo.com



view thread (11+ messages)  latest in thread

Message-ID: <4D8B1C09.4050609@lelarge.info>
Permalink:  ../4D8B1C09.4050609@lelarge.info/
Also on:    postgresql.org/message-id/4D8B1C09.4050609@lelarge.info

 · 

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: guillaume@lelarge.info, jaroslav.zaruba@gmail.com
  Subject: Re: Why pg_dump 'trust' authentication fails under root and works under another user?
  In-Reply-To: <4D8B1C09.4050609@lelarge.info>

* 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