pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pg_hba.conf + all + trust = Ident authentication failed for user "postgres"
9+ messages / 3 participants
[nested] [flat]

* pg_hba.conf + all + trust = Ident authentication failed for user "postgres"
@ 2006-03-06 13:02  ow <oneway_111@yahoo.com>
  0 siblings, 2 replies; 9+ messages in thread

From: ow @ 2006-03-06 13:02 UTC (permalink / raw)
  To: pgsql-admin

PostgreSQL 8.1.0 on i486-pc-linux-gnu, compiled by GCC cc (GCC) 4.0.3 20051111
(prerelease) (Debian 4.0.2-4)


Hi,

Can't get pg_hba.conf with trust to work:

  testusr@test1:~$ psql -U postgres
  psql: FATAL:  Ident authentication failed for user "postgres"

If I do "su postgres" and then "psql -U postgres" then it does work. But I need
testusr to be able to use psql.

Installed "gidentd", rebooted psql but that did not seem to help.

Any ideas? Thanks in advance

--------------------------------------------------------------------------

$ cat pg_hba.conf
# 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
# IPv6 local connections:
host    all         all         ::1/128               trust

--------------------------------------------------------------------------


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



^ permalink  raw  reply  [nested|flat] 9+ messages in thread

* Re: pg_hba.conf + all + trust = Ident authentication failed for user "postgres"
@ 2006-03-06 13:07  Andy Shellam <andy.shellam@mailnetwork.co.uk>
  parent: ow <oneway_111@yahoo.com>
  1 sibling, 1 reply; 9+ messages in thread

From: Andy Shellam @ 2006-03-06 13:07 UTC (permalink / raw)
  To: 'ow' <oneway_111@yahoo.com>; +Cc: pgsql-admin

Does your pg_ident.conf contain anything with reference to testusr? As it
seems to be trying Ident authentication over everything else and failing.

Andy


-----Original Message-----
From: pgsql-admin-owner@postgresql.org
[mailto:pgsql-admin-owner@postgresql.org] On Behalf Of ow
Sent: Monday, 06 March, 2006 1:02 PM
To: pgsql-admin@postgresql.org
Subject: [ADMIN] pg_hba.conf + all + trust = Ident authentication failed for
user "postgres"

PostgreSQL 8.1.0 on i486-pc-linux-gnu, compiled by GCC cc (GCC) 4.0.3
20051111
(prerelease) (Debian 4.0.2-4)


Hi,

Can't get pg_hba.conf with trust to work:

  testusr@test1:~$ psql -U postgres
  psql: FATAL:  Ident authentication failed for user "postgres"

If I do "su postgres" and then "psql -U postgres" then it does work. But I
need
testusr to be able to use psql.

Installed "gidentd", rebooted psql but that did not seem to help.

Any ideas? Thanks in advance

--------------------------------------------------------------------------

$ cat pg_hba.conf
# 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
# IPv6 local connections:
host    all         all         ::1/128               trust

--------------------------------------------------------------------------


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your joining column's datatypes do not
       match

!DSPAM:14,440c330a49416961194852!






^ permalink  raw  reply  [nested|flat] 9+ messages in thread

* Re: pg_hba.conf + all + trust = Ident authentication failed for user "postgres"
@ 2006-03-06 13:21  ow <oneway_111@yahoo.com>
  parent: Andy Shellam <andy.shellam@mailnetwork.co.uk>
  0 siblings, 1 reply; 9+ messages in thread

From: ow @ 2006-03-06 13:21 UTC (permalink / raw)
  To: pgsql-admin


No, pg_ident.conf is empty (i.e. contains only comments). My impression was
that with "trust" nothing was needed in pg_ident.conf, no?

Thanks


--- Andy Shellam <andy.shellam@mailnetwork.co.uk> wrote:

> Does your pg_ident.conf contain anything with reference to testusr? As it
> seems to be trying Ident authentication over everything else and failing.
> 
> Andy
> 

---------------------------------------------------------------------------


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



^ permalink  raw  reply  [nested|flat] 9+ messages in thread

* Re: pg_hba.conf + all + trust = Ident authentication failed for user "postgres"
@ 2006-03-06 13:27  Andy Shellam <andy.shellam@mailnetwork.co.uk>
  parent: ow <oneway_111@yahoo.com>
  0 siblings, 1 reply; 9+ messages in thread

From: Andy Shellam @ 2006-03-06 13:27 UTC (permalink / raw)
  To: 'ow' <oneway_111@yahoo.com>; +Cc: pgsql-admin

No you're right, there shouldn't be anything in pg_ident.conf.

Check in your postgresql.conf file, and set "listen_interfaces" to *, so it
listens on TCP/IP (if not already.)

Then try connecting with "psql -U postgres -h localhost" and see if that
lets you on.  Also check your postgresql.conf file is not forcing pgSQL to
look elsewhere for your config files.

Andy

-----Original Message-----
From: pgsql-admin-owner@postgresql.org
[mailto:pgsql-admin-owner@postgresql.org] On Behalf Of ow
Sent: Monday, 06 March, 2006 1:21 PM
To: pgsql-admin@postgresql.org
Subject: Re: [ADMIN] pg_hba.conf + all + trust = Ident authentication failed
for user "postgres"


No, pg_ident.conf is empty (i.e. contains only comments). My impression was
that with "trust" nothing was needed in pg_ident.conf, no?

Thanks


--- Andy Shellam <andy.shellam@mailnetwork.co.uk> wrote:

> Does your pg_ident.conf contain anything with reference to testusr? As it
> seems to be trying Ident authentication over everything else and failing.
> 
> Andy
> 

---------------------------------------------------------------------------


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
       subscribe-nomail command to majordomo@postgresql.org so that your
       message can get through to the mailing list cleanly

!DSPAM:14,440c377449413902250303!






^ permalink  raw  reply  [nested|flat] 9+ messages in thread

* Re: pg_hba.conf + all + trust = Ident authentication failed for user "postgres"
@ 2006-03-06 13:59  ow <oneway_111@yahoo.com>
  parent: Andy Shellam <andy.shellam@mailnetwork.co.uk>
  0 siblings, 1 reply; 9+ messages in thread

From: ow @ 2006-03-06 13:59 UTC (permalink / raw)
  To: pgsql-admin


In postgresql.conf I have "#listen_addresses = 'localhost'" and I am logged in
directly into the box, without telnet, ssh or whatever.

But "psql -U postgres -h localhost" DID WORK (after I entered the password) and
that's a big step forward, thanks.

I'm still not sure why I needed to enter the password, though... my idea of
"trust" is somewhat different...


--- Andy Shellam <andy.shellam@mailnetwork.co.uk> wrote:

> No you're right, there shouldn't be anything in pg_ident.conf.
> 
> Check in your postgresql.conf file, and set "listen_interfaces" to *, so it
> listens on TCP/IP (if not already.)
> 
> Then try connecting with "psql -U postgres -h localhost" and see if that
> lets you on.  Also check your postgresql.conf file is not forcing pgSQL to
> look elsewhere for your config files.
> 
> Andy
> 




__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



^ permalink  raw  reply  [nested|flat] 9+ messages in thread

* Re: pg_hba.conf + all + trust = Ident authentication failed
@ 2006-03-06 15:05  Stephan Szabo <sszabo@megazone.bigpanda.com>
  parent: ow <oneway_111@yahoo.com>
  1 sibling, 1 reply; 9+ messages in thread

From: Stephan Szabo @ 2006-03-06 15:05 UTC (permalink / raw)
  To: ow <oneway_111@yahoo.com>; +Cc: pgsql-admin

On Mon, 6 Mar 2006, ow wrote:

> PostgreSQL 8.1.0 on i486-pc-linux-gnu, compiled by GCC cc (GCC) 4.0.3 20051111
> (prerelease) (Debian 4.0.2-4)
>
>
> Hi,
>
> Can't get pg_hba.conf with trust to work:
>
>   testusr@test1:~$ psql -U postgres
>   psql: FATAL:  Ident authentication failed for user "postgres"

Are you sure you're using the configuration below (ie, you're editing the
correct file and have at least used sighup after the change)?  It sure
looks like the server thinks the method is ident which would be the
default for the debian packages I think.

> Any ideas? Thanks in advance
>
> --------------------------------------------------------------------------
>
> $ cat pg_hba.conf
> # 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
> # IPv6 local connections:
> host    all         all         ::1/128               trust
>
> --------------------------------------------------------------------------
>
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
> ---------------------------(end of broadcast)---------------------------
> TIP 9: In versions below 8.0, the planner will ignore your desire to
>        choose an index scan if your joining column's datatypes do not
>        match
>



^ permalink  raw  reply  [nested|flat] 9+ messages in thread

* Re: pg_hba.conf + all + trust = Ident authentication failed for user "postgres"
@ 2006-03-06 15:06  Andy Shellam <andy.shellam@mailnetwork.co.uk>
  parent: ow <oneway_111@yahoo.com>
  0 siblings, 0 replies; 9+ messages in thread

From: Andy Shellam @ 2006-03-06 15:06 UTC (permalink / raw)
  To: 'ow' <oneway_111@yahoo.com>; +Cc: pgsql-admin

To me it would suggest that pgSQL is not looking at the pg_hba.conf you
think it is - as it shouldn't prompt for a password when trust
authentication is set (it doesn't on my box when connecting via a socket.)

Also you mention that your listen_address looks like "#listen_addresses" -
in which case it's commented out, and so PG would *NOT* listen on TCP/IP, so
you shouldn't be able to connect using -h localhost - you should get
"connection refused".

I think you've got a case of duplicate config files on your system and PG is
looking at different files to the ones you're editing.

Might be worth running "find / -name pg_hba.conf" and "find / -name
postgresql.conf" to see where all the instances of your config files lie.

Something's not quite right...

Andy

-----Original Message-----
From: pgsql-admin-owner@postgresql.org
[mailto:pgsql-admin-owner@postgresql.org] On Behalf Of ow
Sent: Monday, 06 March, 2006 1:59 PM
To: pgsql-admin@postgresql.org
Subject: Re: [ADMIN] pg_hba.conf + all + trust = Ident authentication failed
for user "postgres"


In postgresql.conf I have "#listen_addresses = 'localhost'" and I am logged
in
directly into the box, without telnet, ssh or whatever.

But "psql -U postgres -h localhost" DID WORK (after I entered the password)
and
that's a big step forward, thanks.

I'm still not sure why I needed to enter the password, though... my idea of
"trust" is somewhat different...


--- Andy Shellam <andy.shellam@mailnetwork.co.uk> wrote:

> No you're right, there shouldn't be anything in pg_ident.conf.
> 
> Check in your postgresql.conf file, and set "listen_interfaces" to *, so
it
> listens on TCP/IP (if not already.)
> 
> Then try connecting with "psql -U postgres -h localhost" and see if that
> lets you on.  Also check your postgresql.conf file is not forcing pgSQL to
> look elsewhere for your config files.
> 
> Andy
> 




__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

!DSPAM:14,440c406f49419332837813!






^ permalink  raw  reply  [nested|flat] 9+ messages in thread

* Re: [SOLVED] pg_hba.conf + all + trust = Ident authentication failed
@ 2006-03-06 15:45  ow <oneway_111@yahoo.com>
  parent: Stephan Szabo <sszabo@megazone.bigpanda.com>
  0 siblings, 1 reply; 9+ messages in thread

From: ow @ 2006-03-06 15:45 UTC (permalink / raw)
  To: pgsql-admin



--- Stephan Szabo <sszabo@megazone.bigpanda.com> wrote:

> Are you sure you're using the configuration below (ie, you're editing the

I was sure... :-)

> correct file and have at least used sighup after the change)? It sure
> looks like the server thinks the method is ident which would be the
> default for the debian packages I think.
> 

But now I looked and, yes, in debian, the server uses config files from
/etc/postgresql/8.1/main/, where it has "ident sameuser" and I was editing the
files in /var/lib/postgresql/8.1/main/, my data directory.

Now it works. Thanks to everyone who responded.




__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



^ permalink  raw  reply  [nested|flat] 9+ messages in thread

* Re: [SOLVED] pg_hba.conf + all + trust = Ident authentication failed
@ 2006-03-06 15:52  Andy Shellam <andy.shellam@mailnetwork.co.uk>
  parent: ow <oneway_111@yahoo.com>
  0 siblings, 0 replies; 9+ messages in thread

From: Andy Shellam @ 2006-03-06 15:52 UTC (permalink / raw)
  To: 'ow' <oneway_111@yahoo.com>; +Cc: pgsql-admin

You could always symlink the debian config files to your correct ones.

Andy

-----Original Message-----
From: pgsql-admin-owner@postgresql.org
[mailto:pgsql-admin-owner@postgresql.org] On Behalf Of ow
Sent: Monday, 06 March, 2006 3:46 PM
To: pgsql-admin@postgresql.org
Subject: Re: [ADMIN] [SOLVED] pg_hba.conf + all + trust = Ident
authentication failed



--- Stephan Szabo <sszabo@megazone.bigpanda.com> wrote:

> Are you sure you're using the configuration below (ie, you're editing the

I was sure... :-)

> correct file and have at least used sighup after the change)? It sure
> looks like the server thinks the method is ident which would be the
> default for the debian packages I think.
> 

But now I looked and, yes, in debian, the server uses config files from
/etc/postgresql/8.1/main/, where it has "ident sameuser" and I was editing
the
files in /var/lib/postgresql/8.1/main/, my data directory.

Now it works. Thanks to everyone who responded.




__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

!DSPAM:14,440c595e49411415720386!






^ permalink  raw  reply  [nested|flat] 9+ messages in thread


end of thread, other threads:[~2006-03-06 15:52 UTC | newest]

Thread overview: 9+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-03-06 13:02 pg_hba.conf + all + trust = Ident authentication failed for user "postgres" ow <oneway_111@yahoo.com>
2006-03-06 13:07 ` Andy Shellam <andy.shellam@mailnetwork.co.uk>
2006-03-06 13:21   ` ow <oneway_111@yahoo.com>
2006-03-06 13:27     ` Andy Shellam <andy.shellam@mailnetwork.co.uk>
2006-03-06 13:59       ` ow <oneway_111@yahoo.com>
2006-03-06 15:06         ` Andy Shellam <andy.shellam@mailnetwork.co.uk>
2006-03-06 15:05 ` Re: pg_hba.conf + all + trust = Ident authentication failed Stephan Szabo <sszabo@megazone.bigpanda.com>
2006-03-06 15:45   ` Re: [SOLVED] pg_hba.conf + all + trust = Ident authentication failed ow <oneway_111@yahoo.com>
2006-03-06 15:52     ` Re: [SOLVED] pg_hba.conf + all + trust = Ident authentication failed Andy Shellam <andy.shellam@mailnetwork.co.uk>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox