| From: | Brett Parker <iDunno(at)sommitrealweird(dot)co(dot)uk> |
|---|---|
| To: | 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 09:52:11 |
| Message-ID: | 20110324095211.GB5521@sommitrealweird.co.uk |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-admin |
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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Jaroslav Záruba | 2011-03-24 10:04:09 | Re: Why pg_dump 'trust' authentication fails under root and works under another user? |
| Previous Message | Jaroslav Záruba | 2011-03-24 09:39:24 | Re: Why pg_dump 'trust' authentication fails under root and works under another user? |