Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id B55B9476142; Tue, 8 Oct 2002 12:21:21 -0400 (EDT) Received: from newman.bcbsm.com (newman.bcbsm.com [167.242.53.42]) by postgresql.org (Postfix) with ESMTP id E633847612C; Tue, 8 Oct 2002 12:21:20 -0400 (EDT) Received: from snt402.corp.bcbsm.com ([167.242.53.42]) by newman.bcbsm.com (Netscape Messaging Server 4.15) with ESMTP id H3O83800.5MU; Tue, 8 Oct 2002 12:21:08 -0400 Received: by snt402.corp.bcbsm.com with Internet Mail Service (5.5.2653.19) id ; Tue, 8 Oct 2002 12:21:07 -0400 Message-ID: <73309C2FDD95D11192E60008C7B1D5BB04C74029@snt452.corp.bcbsm.com> From: "Johnson, Shaunn" To: pgsql-general , pgsql-admin Subject: phpPgAdmin + PostgreSQL + authentication Date: Tue, 8 Oct 2002 12:21:05 -0400 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C26EE6.B3C71F60" X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200210/54 X-Sequence-Number: 5912 This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_001_01C26EE6.B3C71F60 Content-Type: text/plain; charset="iso-8859-1" Howdy: Not sure if this the most likely of maillists to ask, but is anyone using phpPgAdmin? I have a few questions regarding authentication of username / passwords. I'm running PostgreSQL 7.2.1 on RedHat Linux 7.2 kernel 2.4.7-10. I have phpPgAdmin 2.4.2 installed. Basically, I want to know: how to configure phpPgAdmin to allow all the users that exist in pg_shadow to log in and be authenticated? In my pg_hba.conf, I have this: [snip conf file] # TYPE DATABASE IP_ADDRESS MASK AUTH_TYPE AUTH_ARGUMENT local all trust host all 127.0.0.1 255.255.255.255 md5 host all 16.x.x.1 255.0.0.0 md5 host all 192.168.0.0 255.255.255.0 md5 [/snip conf file] In the config.inc.php, I have this: [snip php conf] // The $cfgServers array starts with $cfgServers[1]. Do not use $cfgServers[0]. // You can disable a server config entry by setting host to ''. $cfgServers[1]['local'] = false; $cfgServers[1]['host'] = 'test.localserver.net'; $cfgServers[1]['port'] = '5432'; $cfgServers[1]['adv_auth'] = true; $cfgServers[1]['user'] = ''; // if you are not using adv_auth, // enter the username to connect all the time $cfgServers[1]['password'] = ''; // if you are not using adv_auth and // a password is required enter a password $cfgServers[1]['only_db'] = ''; // if set to a db-name, only this db is accessible [/snip php conf] As I understand it, shouldn't this allow any user with TCP connection to access the database? I suppose I am trying to understand if adv_auth even uses pg_shadow at all, or, does 'local' means that no authentication is needed, anyone can log in. The only thing that happens at the index.php page is when I log in, I get "Wrong username/password. Access denied". I mean, if I can access the database via command line (psql -U joe -d testdb) without needing to authenticate myself, shouldn't that mean that phpPgAdmin allows the same thing? Otherwise, I should be able to use what's in pg_shadow, right? I am re-reading the documentation page. Any info / direction is appreciated. Thanks! -X ------_=_NextPart_001_01C26EE6.B3C71F60 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable phpPgAdmin + PostgreSQL + authentication

Howdy:

Not sure if this the most likely of maillists to ask,
but is anyone using phpPgAdmin?  I have a few quest= ions
regarding authentication of username / passwords.

I'm running PostgreSQL 7.2.1 on RedHat Linux 7.2 kernel 2= .4.7-10.
I have phpPgAdmin 2.4.2 installed.

Basically, I want to know:  how to configure phpPgAd= min to
allow all the users that exist in pg_shadow to log in an= d
be authenticated?

In my pg_hba.conf, I have this:

[snip conf file]

# TYPE     DATABASE   = IP_ADDRESS    MASK       = ;        AUTH_TYPE  AUTH_ARGUMENT
local        all = ;            &n= bsp;            = ;            &n= bsp;     trust
host         all=          127.0.0.1   = ;    255.255.255.255    md5
host         all=          16.x.x.1   =      255.0.0.0       = ;   md5
host         all=          192.168.0.0  &nb= sp;  255.255.255.0      md5

[/snip conf file]

In the config.inc.php, I have this:

[snip php conf]


// The $cfgServers array starts with $cfgServers[1]. = ; Do not use $cfgServers[0].
// You can disable a server config entry by setting host= to ''.
$cfgServers[1]['local']     &nb= sp;   =3D false;
$cfgServers[1]['host']     &nbs= p;    =3D 'test.localserver.net';
$cfgServers[1]['port']     &nbs= p;    =3D '5432';
$cfgServers[1]['adv_auth']     = =3D true;

$cfgServers[1]['user']      = ;    =3D '';   // if you are not using adv_auth, <= /FONT>
            &nbs= p;              = ;              =            // e= nter the username to connect all the time
$cfgServers[1]['password']     = =3D '';   // if you are not using adv_auth and
            &nbs= p;              = ;              =            // a= password is required enter a password
$cfgServers[1]['only_db']     &= nbsp; =3D '';   // if set to a db-name, only this db is accessibl= e


[/snip php conf]

As I understand it, shouldn't this allow any user with TC= P connection
to access the database?  I suppose I am trying to u= nderstand if
adv_auth even uses pg_shadow at all, or, does 'local' me= ans that
no authentication is needed, anyone can log in.

The only thing that  happens at the index.php page i= s when I log
in, I get "Wrong username/password. Access denied&q= uot;.

I mean, if I can access the database via command line (ps= ql -U joe -d testdb)
without needing to authenticate myself, shouldn't that m= ean that phpPgAdmin
allows the same thing?  Otherwise, I should be able= to use what's in
pg_shadow, right?

I am re-reading the documentation page.  Any info / = direction is appreciated.

Thanks!

-X

------_=_NextPart_001_01C26EE6.B3C71F60--