psql from Linux script

Поиск
Список
Период
Сортировка
Искать
От
Bernard
Тема
psql from Linux script
Дата
Msg-id
4h08h1dcq5i2tdlqmv9osaog00chkljs6r@4ax.com
Список
Дерево обсуждения
Re: psql from Linux script Bernard <bht@actrix.gen.nz>
Re: psql from Linux script Marko Kreen <marko@l-t.ee>
Re: psql from Linux script Martijn van Oosterhout <kleptog@svana.org>
Re: psql from Linux script Peter Eisentraut <peter_e@gmx.net>
Re: psql from Linux script Greg Stark <gsstark@mit.edu>
Dear Postgresql Specialists

I am failing to update the password of the postgresql user from within
a Linux installation script run by root:

# su - postgres -c echo "ALTER USER postgres WITH PASSWORD
'newpassword';" | psql -U postgres template1
psql: FATAL:  Ident authentication failed for user "postgres"

In contrast, there is no problem with the same command issued in psql
interactively:

# su postgres
$ psql template1
template1=# ALTER USER postgres WITH PASSWORD 'newpassword';
ALTER USER
\q
$ exit
# 

The client authentication configuration file pg_hba.conf is in its
original state.

I would appreciate your help very much.

Thanks.

Bernard
В списке pgsql-general по дате отправления
От: Matt A.
Дата:
Сообщение: Re: [SQL] question
От: Hannes Dorbath
Дата:
Сообщение: temp_buffers
FAQ