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

Поиск
Список
Период
Сортировка
От Brett Parker
Тема Re: Why pg_dump 'trust' authentication fails under root and works under another user?
Дата
Msg-id 20110324095211.GB5521@sommitrealweird.co.uk
обсуждение исходный текст
Ответ на Re: Why pg_dump 'trust' authentication fails under root and works under another user?  (Jaroslav Záruba <jaroslav.zaruba@gmail.com>)
Список 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

В списке pgsql-admin по дате отправления:

Предыдущее
От: Guillaume Lelarge
Дата:
Сообщение: Re: Why pg_dump 'trust' authentication fails under root and works under another user?
Следующее
От: Guillaume Lelarge
Дата:
Сообщение: Re: Why pg_dump 'trust' authentication fails under root and works under another user?