Re: problems logging in through phpPgAdmin

From: "Davenport, Julie" <JDavenport(at)ctcd(dot)edu>
To: John DeSoi <desoi(at)pgedit(dot)com>
Cc: "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>, "Hussey, Latasha" <LHussey(at)ctcd(dot)edu>
Subject: Re: problems logging in through phpPgAdmin
Date: 2011-09-26 19:16:41
Message-ID: 53AA753E5EA4A14784092D825AD4FD3D046D655E@CTC3650D.campus.ctcd.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Sorry, when I said we had no trouble getting in from the command line, I meant that I could do the following to get into database named srn_mst (after su-ing to postgres user):

psql srn_mst

and it will get me into the database whether I have the line set to trust or md5. And does not ask for a password either way (never does). This is how I always access the database from the command line. When I tried the way you suggested:

psql -U postgres -h 127.0.0.1 -d srn_mst

if set to trust, this logs me in (does not ask for password of course).
If set to md5, this command asks me for password, but when I put it in, gives me this error:
psql: FATAL: password authentication failed for user "postgres"
(same as what is happening through the application).

Yes, PHP and phpPgAdmin and postgresql are all running on the same linux server (where this database srn_mst resides).

This is the enry in my phppgadmin conf file config.inc.php for this server:
// Soarapp
$conf['servers'][3]['desc'] = 'Soarapp';
$conf['servers'][3]['host'] = 'localhost';
$conf['servers'][3]['port'] = 5432;
$conf['servers'][3]['defaultdb'] = 'template1';
$conf['servers'][3]['pg_dump_path'] = '/usr/bin/pg_dump';
$conf['servers'][3]['pg_dumpall_path'] = '/usr/bin/pg_dumpall';
Not sure if that is what your question refers to...

Thanks....

Julie

-----Original Message-----
From: John DeSoi [mailto:desoi(at)pgedit(dot)com]
Sent: Monday, September 26, 2011 1:58 PM
To: Davenport, Julie
Cc: pgsql-admin(at)postgresql(dot)org; Hussey, Latasha
Subject: Re: [ADMIN] problems logging in through phpPgAdmin

On Sep 26, 2011, at 2:19 PM, Davenport, Julie wrote:

> If I use this combination:
> local all all trust
> host all all 127.0.0.1/32 md5
> or this:
> local all all md5
> host all all 127.0.0.1/32 md5
>
> then we cannot login at all -- even if we put in the correct password, we get "Login Failed" on the screen, and we just see " FATAL: password authentication failed for user "postgres"" in the log under pg_log.

And you say you tested psql from the command line like this

psql -U postgres -h 127.0.0.1

and it prompts you for the password and accepts the one you are entering with phpPgAdmin?

And PHP is running on the same server as Postgres?

What is the IP address used in your phpPgAdmin configuration? If it is not 127.0.0.1, you might need to use the explicit IP address in your pg_hba.conf.

Best,

John DeSoi, Ph.D.

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Kevin Grittner 2011-09-26 19:55:36 Re: PG 9.1 Replication class advise
Previous Message John DeSoi 2011-09-26 18:58:21 Re: problems logging in through phpPgAdmin