AsTeR
AsTeR

Reputation: 7521

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?

Upvotes: 9

Views: 18790

Answers (1)

Tometzky
Tometzky

Reputation: 23890

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.

Upvotes: 14

Related Questions