Search Postgresql Archives

Re: psql from Linux script

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

               http://archives.postgresql.org

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux