Re: psql from Linux script - Mailing list pgsql-general

From Marko Kreen
Subject Re: psql from Linux script
Date
Msg-id 20050830081010.GA18410@l-t.ee
Whole thread Raw
In response to psql from Linux script  (Bernard <bht@actrix.gen.nz>)
Responses Re: psql from Linux script
List pgsql-general
On Tue, Aug 30, 2005 at 07:04:52PM +1200, Bernard wrote:
> 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"

I do not think the psql is ran as 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
> #

--
marko


pgsql-general by date:

Previous
From: Hannes Dorbath
Date:
Subject: temp_buffers
Next
From: Ben-Nes Yonatan
Date:
Subject: Re: Planner create a slow plan without an available index