[support] [Solved, sort of]Re: Authentication problem, was Re: Recent move Drupal 6.22, PHP5.3, PostGresql 8.4 doesn't work - continuing

Metzler, David metzlerd at evergreen.edu
Mon Mar 25 23:45:24 UTC 2013


Since you asked for advice: 

With postgres, How the connection string is formed makes a lot of difference to which methods are used for authentication.

For example if I use psql -h mypghost at example.com I will be connecting through the servers ip, but if you say psql -h localhost it will be using the loopback interface these rules can be interpreted differently through hba.conf.  

I also mentioned the user/owner of the database affects privileges as well. So when you import a postgres database, the database owner makes a big difference. You might have restored the database owner with the restore, but that owner might not exist.  Another thing that might account for the difference in behavior between the migrated and imported databases is what user you were logged in as when creating vs. importing the database. 

Each of these users/database/authentication mechanisms may have different allowed authentication types in the hba.conf. 

In the end it sounds like you are struggling with which authentication mechanism was chosen for the connection between drupal and postgres.   

In short there are a lot of variables here, so you may need to consult a postgres support list to untangle the right combination of options for it. 

Glad you got it working....

Dave


-----Original Message-----
From: support-bounces at drupal.org [mailto:support-bounces at drupal.org] On Behalf Of Max Pyziur
Sent: Monday, March 25, 2013 4:27 PM
To: support at drupal.org
Subject: [support] [Solved, sort of]Re: Authentication problem, was Re: Recent move Drupal 6.22, PHP5.3, PostGresql 8.4 doesn't work - continuing



On Mon, 25 Mar 2013, Max Pyziur wrote:

> On Mon, 25 Mar 2013, Earnie Boyd wrote:
>
>> Ensure you empty any table with cache* as well as sessions table.
>
> It's beginning to look like an authentication problem.
>
> I added the following lines to ~/index.php,
> error_reporting(E_ALL);
> ini_set('display_errors', TRUE);
> ini_set('display_startup_errors', TRUE);
>
>
> and found the following:
> The pgsql error was: pg_connect(): Unable to connect to PostgreSQL server:
> fe_sendauth: no password supplied.
>
> I've tried adjusting the following line:
> pgsql://username:password@localhost/databasename
>
> By adding a password (the one that I have on record).
>
> It returns a 'FATAL'
>
> Any pointers on debugging this? I is in the data tables? Or elsewhere?

This is clearly a postgresl authentication issue.

I made an adjustment to /var/lib/pgsql/data/pg_hba.conf in the IPv6 
section, relaxing the constraint. That got all eight or so legacy Drupal 
6.x sites running correctly.

What is confusing is that the newly installed Drupal 6.x sites functioned 
correctly w/o this adjustment.

Since security is a concern, I would appreciate advice here.

I had a similar issue almost two years ago; the following URL from 
support at drupal.org was key:
http://lists.drupal.org/pipermail/support/2011-May/018098.html

Thanks to Ivan Sergio Borgonovo on that thread

>> Earnie
>
> Max Pyziur
> pyz at brama.com
[recycle]
-- 
[ Drupal support list | http://lists.drupal.org/ ]


More information about the support mailing list