Search Postgresql Archives

Re: psql from Linux script

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

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


Hi,

On Tue, 30 Aug 2005, Marko Kreen wrote:

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.

Yes, this should be rewritten as:

echo "ALTER USER postgres WITH PASSWORD 'newpassword';" |su -l \
postgres -c "psql template1"

Regards,
- --
Devrim GUNDUZ
Kivi Bilişim Teknolojileri - http://www.kivi.com.tr
devrim~gunduz.org, devrim~PostgreSQL.org, devrim.gunduz~linux.org.tr
                     http://www.gunduz.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQFDFBkBtl86P3SPfQ4RApBiAKDJY0HlXZSExl+9zXv1Q/bUL6tQAgCbBnBZ
vUxKGhAVOAFA2ia9OsBxdHc=
=1zxD
-----END PGP SIGNATURE-----
---------------------------(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