Login Problems.

Started by John Clark Naldoza y Lopezover 25 years ago3 messagesgeneral
Jump to latest
#1John Clark Naldoza y Lopez
njclark@ntsp.nec.co.jp

Hello,

I have my PostgreSQL configured as follows:

/usr/bin/postmaster
-p 5432
-D /var/lib/pgsql/data
-B 64
-b /usr/bin/postgres
-i
-N 32

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'

what am I missing here? ;-)

Thanks in advance.

Cheers,

John Clark

#2Adam Lang
aalang@rutgersinsurance.com
In reply to: John Clark Naldoza y Lopez (#1)
Re: Login Problems.

For the local all, should that just be trust? Nothing is being sent over
the network, so it shouldn't matter, right?

Adam Lang
Systems Engineer
Rutgers Casualty Insurance Company
----- Original Message -----
From: "John Clark L. Naldoza" <njclark@ntsp.nec.co.jp>
To: <pgsql-general@postgresql.org>
Sent: Thursday, September 28, 2000 10:19 PM
Subject: [GENERAL] Login Problems.

Show quoted text

Hello,

I have my PostgreSQL configured as follows:

/usr/bin/postmaster
-p 5432
-D /var/lib/pgsql/data
-B 64
-b /usr/bin/postgres
-i
-N 32

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'

what am I missing here? ;-)

Thanks in advance.

Cheers,

John Clark

#3Tom Lane
tgl@sss.pgh.pa.us
In reply to: Adam Lang (#2)
Re: Login Problems.

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