Re: Login Problems. - Mailing list pgsql-general

From Tom Lane
Subject Re: Login Problems.
Date
Msg-id 17156.970237290@sss.pgh.pa.us
Whole thread Raw
In response to Re: Login Problems.  ("Adam Lang" <aalang@rutgersinsurance.com>)
List pgsql-general
>> and the pg_hba.conf file has the following lines in it:
>>
>> local        all         crypt
>> host         all         127.0.0.1     255.255.255.255     crypt
>>
>> Now when I try to connect to a database (locally) using psql I get the
>> following:
>>
>> psql: Password authentication failed for user 'postgres'

Well, you are specifying crypt (ie, password-based) authentication,
so this is hardly an unexpected message.  If you look in the
postmaster's logfile (whereever you redirected its stdout/stderr to;
do not start it with -S if you want a logfile) then there should be
additional information about the authentication failure.  For obvious
security reasons the postmaster doesn't report everything it knows to
the rejected client, but it tells more in the log.

I'm betting that you forgot to set up a password for the postgres user.
You will need to use a non-password-based auth mechanism at least for
long enough to set the password --- or use one of the variant setups
where the passwords are kept in a separate flat file rather than in the
database (see pg_passwd).

            regards, tom lane

pgsql-general by date:

Previous
From: "Keith G. Murphy"
Date:
Subject: Re: Talking with other Dbases.
Next
From: "Alfredo"
Date:
Subject: Redhat 7 and PgSQL