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: 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 08:03:07
Message-ID: 4D8AFABB.1010002@lelarge.info (view raw or flat)
Thread:
Lists: pgsql-admin
Le 24/03/2011 08:34, Jaroslav Záruba a écrit :
> Hello
> 
> I have pg_dump command in cron that accesses PostgreSQL under user postgres
> and does not provide a password.
> 
> pg_dump --username=postgres ...
> 
> I have set in pg_hba.conf that user postgres should be trusted for all
> databases from localhost.
> 
> local all postgres trust
> 
> When I run the command under regular user it works.
> When I run it under root (sudo -i) it requires password, and therefore the
> crontab task fails to authenticate.
> 

Are you sure the password is not asked by the sudo command, rather than
by the pg_dump one?


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

In response to

Responses

pgsql-admin by date

Next:From: lst_hoe02Date: 2011-03-24 08:32:45
Subject: Re: About migration to Postgre
Previous:From: SimonDate: 2011-03-24 07:49:51
Subject: Re: Why pg_dump 'trust' authentication fails under root and works under another user?

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