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 18:19:58
Message-ID: 53AA753E5EA4A14784092D825AD4FD3D046D64E2@CTC3650D.campus.ctcd.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

This is what is in our pg_hba.conf file now, and it lets us login with no password or wrong password:

# TYPE DATABASE USER CIDR-ADDRESS METHOD

# "local" is for Unix domain socket connections only
local all all trust
# IPv4 local connections:
host all all 127.0.0.1/32 trust
host srn_mst postgres <IP of remote server1> 255.255.255.255 trust
host debase postgres <IP of remote server2> 255.255.255.255 trust
host all all <IP of local server> 255.255.255.255 md5
# IPv6 local connections:
host all all ::1/128 ident
host all all 127.0.0.1/32 trust
-bash-3.2$

If I use this combination:
local all all md5
host all all 127.0.0.1/32 trust

same thing - we can login with no password or wrong password

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.

I also changed this line from trust to md5:
host all all <IP of local server> 255.255.255.255 md5
and as long as the line above
host all all 127.0.0.1/32 trust
is trust we can get in, and if it is md5, we cannot (in other words, it seems to override the line with the actual IP of the local server).


Julie A. Davenport
Senior Systems Engineer
Distance Education & Educational Technology
Central Texas College
254-526-1798
julie(dot)davenport(at)ctcd(dot)edu

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

On Sep 26, 2011, at 10:16 AM, Davenport, Julie wrote:

> We are using phpPgAdmin 4.2.3 on Redhat Linux 5 to access local postgres 8.4 databases and some remote postgres 8.0 and 7.4 databases. If I set the pg_hba.conf settings to "trust" I can login to phpPgAdmin with any password at all or with no password at all. If I change the "trust" to "md5" I get "Login Failed" errors on every login (we always login as postgres), even though the password is correct. When this happens I check the log in pg_log folder, and all it says is "FATAL: password authentication failed for user "postgres"". In the phpPgAdmin config.inc.php file, we have this setting:
> $conf['extra_login_security'] = false;
> We are not having any problems logging into the databases from the command line.

Is the pg_hba.conf line where you changed "trust" to "md5" host or local? I think phpPgAdmin uses only host connections.

John DeSoi, Ph.D.

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Isabella Ghiurea 2011-09-26 18:29:51 PG 9.1 Replication class advise
Previous Message John DeSoi 2011-09-26 17:44:06 Re: problems logging in through phpPgAdmin