Skip site navigation (1) Skip section navigation (2)

Re: Why pg_dump 'trust' authentication fails under root and works under another user?

From: Guillaume Lelarge <guillaume(at)lelarge(dot)info>
To: Jaroslav Záruba <jaroslav(dot)zaruba(at)gmail(dot)com>
Cc: PostgreSQL - mailing list <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Why pg_dump 'trust' authentication fails under root and works under another user?
Date: 2011-03-24 10:25:13
Message-ID: 4D8B1C09.4050609@lelarge.info (view raw or flat)
Thread:
Lists: pgsql-admin
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

In response to

Responses

pgsql-admin by date

Next:From: Guillaume LelargeDate: 2011-03-24 10:47:43
Subject: Re: Why pg_dump 'trust' authentication fails under root and works under another user?
Previous:From: Fujii MasaoDate: 2011-03-24 10:05:54
Subject: Re: Restarting recovery mode with pg_standby after failure

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group