Jaume Teixi <teixi(at)6tems(dot)com> writes:
> $ psql -d template1 -U postgres
> psql: Peer authentication failed for user 'postgres'
There is no such animal as "peer" authentication in Postgres. Are you
using a locally hacked version?
regards, tom lane