Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PostgreSQL without password prompt : .pgpass ignored

I'm trying to enable root (Ubuntu 8.04) to use psql command without password prompt (for scripting purpose). Everything worked fine with PostgreSQL 8.3, but I migrate to PostgreSQL 8.4 and the login without password doesn't work anymore.

I've a correct .pgpass file (the same used for 8.3), the right of /root/.pgpass are 0600 but calling psql keep asking for a password.

NB : the PGPASSFILE variable is empty, so I assume that the .pgpass file is supposed to be used.

Any brilliant idea?

like image 363
AsTeR Avatar asked Feb 04 '23 02:02

AsTeR


1 Answers

Try to check if this works:

*:*:*:postgres:password_for_postgres_user

And then try:

VERBOSITY=verbose psql --no-password --user postgres

This question should probably be migrated to serverfault.com.

like image 109
Tometzky Avatar answered Feb 05 '23 16:02

Tometzky