[pgpool-general: 1485] pgpool and md5 auth
uruvela of india
uruvela at email.com
Thu Mar 14 23:20:51 JST 2013
Hi,
I'm looking for some help with MD5 authentification in pgpool.
1st :
pgpool-II version 3.2.2 (namameboshi)
PG 9.2.3
* On PG server : I create a toto role with encrypted password, and add this line in pg_hba.conf :
host mydb toto my_pgpool_ip/32 md5
Restarting PG.
* On pgpool server :
pgpool.conf :
enable_pool_hba = on
pool_passwd = 'pool_passwd'
Create toto md5 password in pool_passwd :
toto:md5cb926329843e9a8f3eb15e0a2a5c9851
Checking same thing in PG in pg_authid :
| toto | md5cb926329843e9a8f3eb15e0a2a5c9851 |
pool_hba.conf :
add this line : local mydb toto md5
2nd :
Starting pgpool.
Using perl script dbi.pl http://dbi.pl&lang=en to test on pgpool server :
use DBI;
$DB_name = 'mydb';
$DB_user = 'toto';
$DB_pwd = 'mypassword';
$dbh = DBI->connect("dbi:Pg:dbname=$DB_name","$DB_user","$DB_pwd");
if ( !defined $dbh ) { die "Cannot connect to database!\n"; }
$sth = $dbh->prepare("SELECT * FROM pg_user");
$sth->execute();
while ( ($id,$name) = $sth->fetchrow_array() ) { print "$id\t\t $name \n";
}
$sth->finish();
$dbh->disconnect();
1st launch : working
2nd launch : changing md5 to reject in pool_hba.conf (restarting pgpool) : DBI connect('dbname=mydb','toto',...) failed: ERROR: no pool_hba.conf entry for host "[local]", user "toto", database "mydb" at dbi.pl http://dbi.pl&lang=en line 5
3rd launch : back to md5 in pool_hba.conf and changing toto by tito in pool_passwd (restarting pgpool) : DBI connect('dbname=mydb','toto',...) failed: ERROR: "MD5" authentication with pgpool failed for user "toto" at dbi.pl http://dbi.pl&lang=en line 5
4th launch : back to toto vs tito in pool_passwd and deleted everything after md5 (now pool_passwd is like this 'toto:md5') + restarting pgpool : working.
I miss something i'm sure :) but why it's working in 4th try ? It's seems only PG server do it's authentification job's.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.pgpool.net/pipermail/pgpool-general/attachments/20130314/9ff7aa83/attachment.htm>
More information about the pgpool-general
mailing list