Authentication failedIf you can't connect to postgres with the psql command (this happens, for example, with Ubuntu 9.10 and postgres 8.3):
$ psql -W gis username psql: FATAL: Ident authentication failed for user "username"Even after you've set the password for the user:
$ sudo -u postgres -s -H postgres@aoeu$ psql Welcome to psql 8.3.5, the PostgreSQL interactive terminal. ALTER ROLE username PASSWORD 'mypassword';You may have to append the following lines to your pg_hba.conf (found e.g. in /etc/postgresql/8.3/main):
local all all trust host all all 127.0.0.1/32 trust host all all ::1/128 trustSo that you can use password authentication from localhost.
Note that you may have to comment out any existing lines beginning with local all or host all. I had to comment out the following section on Ubuntu 8.40:
# "local" is for Unix domain socket connections only #local all all ident sameuser # IPv4 local connections: #host all all 127.0.0.1/32 md5 # IPv6 local connections: #host all all ::1/128 md5
Xiaoyu Guan (Sam)