Обсуждение: Confusion about ident sameuser

Поиск
Список
Период
Сортировка

Confusion about ident sameuser

От
"Gurjeet Singh"
Дата:
Hi All,

    I am confused with the 'ident sameuser' authentication.  Here's my setup:

[postgres@db2 ~]$ grep -v "^#" <data_dir>/pg_hba.conf
local   all         all                               ident sameuser
host    all         all         127.0.0.1/32          ident sameuser
host    all         all         10.0.0.0/8            password

[postgres@db2 ~]$ pg_ctl -D <data_dir> reload

[postgres@db2 ~]$ psql -h 10.10.0.27 -p 6543 -d postgres -U postgres
Password for user postgres:

[postgres@db2 ~]$ psql -p 6543 -d postgres -U postgres
Welcome to psql 8.1.11, the PostgreSQL interactive terminal.

[postgres@db2 ~]$ psql -h localhost -p 6543 -d postgres -U postgres
psql: FATAL:  Ident authentication failed for user "postgres"

As you can see, if I use the machine's interface or unix sockets, it either asks for password or lets me in. But when I use localhost, it correctly uses 127.0.... line for authentication, but does not let me in!!!

Is this not supposed to work? Could it be because I might not be having an ident server running on my box? How do I determine if I have an ident server running?

Thanks in advance,

--
gurjeet[.singh]@EnterpriseDB.com
singh.gurjeet@{ gmail | hotmail | indiatimes | yahoo }.com

EnterpriseDB http://www.enterprisedb.com

Mail sent from my BlackLaptop device

Re: Confusion about ident sameuser

От
"Douglas McNaught"
Дата:
On Wed, Jul 2, 2008 at 9:55 PM, Gurjeet Singh <singh.gurjeet@gmail.com> wrote:

> As you can see, if I use the machine's interface or unix sockets, it either
> asks for password or lets me in. But when I use localhost, it correctly uses
> 127.0.... line for authentication, but does not let me in!!!
>
> Is this not supposed to work? Could it be because I might not be having an
> ident server running on my box? How do I determine if I have an ident server
> running?

It's almost certain that that's the problem.

ident is configured off by default on most systems.  Whether it's a
separate daemon or invoked through inetd/xinetd depends on the
distribution.

-Doug