pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
problem with the postgres db user
2+ messages / 2 participants
[nested] [flat]

* problem with the postgres db user
@ 2011-09-26 23:52  Kasia Tuszynska <ktuszynska@esri.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Kasia Tuszynska @ 2011-09-26 23:52 UTC (permalink / raw)
  To: pgsql-admin

Hi Everybody,
Am running into a problem with the following scenario:
I am not able to login as the db postgres user, on

Ubuntu 10.04 (Lucid Lynx)
Postgres 9.0.4

Postgres was installed with rpm for ubuntu
The password for the postgres user was set after installation
I am able to su to the postgres user with that password
I am able to  start psql as the os postgres user

But
If I am logged in as anyone else and try: pgsql -U postgres  and use the password - I get the following error:
Psql: FATAL:  Ident authentication failed for user "postgers"

I tried altering the password for the postgres user, with:

ALTER USER postgres WITH ENCRYPTED PASSWORD 'password'

It tells me that it is successful. But I am still not able to use the new password.

pg_hba.conf, has no restriction on the postgres user, if fact it has no restriction on anyone:
host    all             all             0.0.0.0/0               md5


What am I missing?
Thanks,
Kasia

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

* Re: problem with the postgres db user
@ 2011-09-27 00:54  Tom Lane <tgl@sss.pgh.pa.us>
  parent: Kasia Tuszynska <ktuszynska@esri.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2011-09-27 00:54 UTC (permalink / raw)
  To: Kasia Tuszynska <ktuszynska@esri.com>; +Cc: pgsql-admin

Kasia Tuszynska <ktuszynska@esri.com> writes:
> If I am logged in as anyone else and try: pgsql -U postgres  and use the password - I get the following error:
> Psql: FATAL:  Ident authentication failed for user "postgers"

That's what's supposed to happen, if you're using ident authentication.
If you want to be able to log in under someone else's name, you need to
use some other auth method, such as md5.

> pg_hba.conf, has no restriction on the postgres user, if fact it has no restriction on anyone:
> host    all             all             0.0.0.0/0               md5

It is not using that pg_hba entry; if it were, you'd not be getting that
error message.  Likely theories are that the connection is coming in via
Unix socket not TCP (you need to fix the "local" line), or that you
forgot to SIGHUP the postmaster after editing the file, or that there's
some earlier entry in the file that's capturing these connection
attempts.

			regards, tom lane



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


end of thread, other threads:[~2011-09-27 00:54 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2011-09-26 23:52 problem with the postgres db user Kasia Tuszynska <ktuszynska@esri.com>
2011-09-27 00:54 ` Tom Lane <tgl@sss.pgh.pa.us>

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