Thread: Can't start postmaster on -HEAD

Can't start postmaster on -HEAD

From
Devrim GÜNDÜZ
Date:
This is a fresh snapshot -- is also happened on Nov 28th snapshot, too:

-bash-3.2$ pg_ctl start
server starting
-bash-3.2$ LOG:  authentication option not in name=value format: sameuser

CONTEXT:  line 70 of configuration file "/var/lib/pgsql/data/pg_hba.conf"
FATAL:  could not load pg_hba.conf

Line 70 is:

local   all         all                               ident sameuser

(Ran initdb via RPM init script btw).

Am I missing something?
--
Devrim GÜNDÜZ, RHCE
devrim~gunduz.org, devrim~PostgreSQL.org, devrim.gunduz~linux.org.tr                  http://www.gunduz.org

Re: Can't start postmaster on -HEAD

From
Peter Eisentraut
Date:
On Thursday 04 December 2008 17:19:28 Devrim GÜNDÜZ wrote:
> This is a fresh snapshot -- is also happened on Nov 28th snapshot, too:
>
> -bash-3.2$ pg_ctl start
> server starting
> -bash-3.2$ LOG:  authentication option not in name=value format: sameuser
>
> CONTEXT:  line 70 of configuration file "/var/lib/pgsql/data/pg_hba.conf"
> FATAL:  could not load pg_hba.conf
>
> Line 70 is:
>
> local   all         all                               ident sameuser
>
> (Ran initdb via RPM init script btw).
>
> Am I missing something?

The hba file format has changed.  Your simplest fix would be to remove
the "sameuser".


Re: Can't start postmaster on -HEAD

From
Devrim GÜNDÜZ
Date:
On Thu, 2008-12-04 at 19:20 +0200, Peter Eisentraut wrote:
> The hba file format has changed.  Your simplest fix would be to remove
> the "sameuser".

This is a file created by initdb -- so is it a bug?
--
Devrim GÜNDÜZ, RHCE
devrim~gunduz.org, devrim~PostgreSQL.org, devrim.gunduz~linux.org.tr                  http://www.gunduz.org

Re: Can't start postmaster on -HEAD

From
Magnus Hagander
Date:
Devrim GÜNDÜZ wrote:
> On Thu, 2008-12-04 at 19:20 +0200, Peter Eisentraut wrote:
>> The hba file format has changed.  Your simplest fix would be to remove
>> the "sameuser".
> 
> This is a file created by initdb -- so is it a bug?

Do the RPM initscript by any chance pass something like '-A "ident
sameuser"' to initdb? If so, that's where the fix needs to go. Initdb
defaults to "trust"...

//Magnus


Re: Can't start postmaster on -HEAD

From
Andrew Dunstan
Date:

Devrim GÜNDÜZ wrote:
> On Thu, 2008-12-04 at 19:20 +0200, Peter Eisentraut wrote:
>   
>> The hba file format has changed.  Your simplest fix would be to remove
>> the "sameuser".
>>     
>
> This is a file created by initdb -- so is it a bug?
>   

If it were a bug in our sources the buildfarm would be broken, but it isn't.

Does your package patch the default pg_hba.conf, or initdb?

cheers

andrew


Re: Can't start postmaster on -HEAD

From
Devrim GÜNDÜZ
Date:
On Thu, 2008-12-04 at 18:38 +0100, Magnus Hagander wrote:
> Do the RPM initscript by any chance pass something like '-A "ident
> sameuser"' to initdb? If so, that's where the fix needs to go. Initdb
> defaults to "trust"...

Good catch. So, AFAICS running initdb with

-A ident

will do the trick.

BTW, should I worry about thi the krb5 message below?

$ psql -U postgres
psql: pg_krb5_init: krb5_cc_get_principal: No credentials cache found
FATAL:  Ident authentication failed for user "postgres"

Regards,
--
Devrim GÜNDÜZ, RHCE
devrim~gunduz.org, devrim~PostgreSQL.org, devrim.gunduz~linux.org.tr                  http://www.gunduz.org

Re: Can't start postmaster on -HEAD

From
Magnus Hagander
Date:
Devrim GÜNDÜZ wrote:
> On Thu, 2008-12-04 at 18:38 +0100, Magnus Hagander wrote:
>> Do the RPM initscript by any chance pass something like '-A "ident
>> sameuser"' to initdb? If so, that's where the fix needs to go. Initdb
>> defaults to "trust"...
> 
> Good catch. So, AFAICS running initdb with
> 
> -A ident
> 
> will do the trick.
> 
> BTW, should I worry about thi the krb5 message below?
> 
> $ psql -U postgres
> psql: pg_krb5_init: krb5_cc_get_principal: No credentials cache found
> FATAL:  Ident authentication failed for user "postgres"

Worry, no.

But it's on my list to look at making it not happen. It happens because
we do kerberos stuff earlier than we know if we're actually going to do
a kerberos connection - which we don't do for any other authentication
methods..

//Magnus