pg_hba.conf and ident authentification

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

pg_hba.conf and ident authentification

От:
Jozef KRSSAK <krssak@upc.uniba.sk>
Дата:
I don't know, what is problem, see next please:

1. OS: 
debian linux 2.2.x

2. postgres version: 
6.5.3

3. auth deamon runing

4. name of my account:
krssak

5. pg_hba.conf:
local   rocnikovy                                       trust
host    rocnikovy       127.0.0.1       255.255.255.255 ident   map

6. pg_ident.conf:
map     krssak  jozok

7. create user jozok;

8. select * from pg_shadow; :
usename |usesysid|usecreatedb|usetrace|usesuper|usecatupd|passwd|valuntil

--------+--------+-----------+--------+--------+---------+------+---------------
-------
jozok   |    1091|f          |f       |f       |f        |      |

postgres|      31|t          |t       |t       |t        |
|2037-01-31 07:0
0:00+01

9. 
krssak@pec:~$ psql -h localhost -d rocnikovy
Connection to database 'rocnikovy' failed.
IDENT authentication failed for user 'krssak'
krssak@pec:~$

what am I missing?

thanks

====================================================================
Univerzitne pastoracne centrum bl. Jozefa Freinademetza v Bratislave
Jozef Krssak
krssak@upc.uniba.sk       tel. 0905 906 297
====================================================================


Re: pg_hba.conf and ident authentification

От:
Jozef Krssak <krssak@upc.uniba.sk>
Дата:
of course:
postmaster.init:
PGALLOWTCPIP=yes

---------------------------
Jozef KRSSAK


Re: pg_hba.conf and ident authentification

От:
Jozef Krssak <krssak@upc.uniba.sk>
Дата:
sorry, I want to say:
PGALLOWTCPIP=yes
but nothing

krssak@pec:~$ psql -h localhost -d rocnikovy
Connection to database 'rocnikovy' failed.
IDENT authentication failed for user 'krssak'
krssak@pec:~$

Jozef Krssak


Re: pg_hba.conf and ident authentification

От:
Jozef Krssak <krssak@upc.uniba.sk>
Дата:
>This is just a guess, which may be wrong as you did not post your postmaster
>options and the error message explicitly points out IDENT as the culprit. If
>my guess is wrong, your IDENT setup would be a good place to look (and
>tcpwrappers or anything else that might affect).

IDENT setup is OK, I think:
/var/log/syslog:
Apr 12 14:14:55 pec identd[5349]: reply to 127.0.0.1: 1610 , 5432 : USERID : UNIX
:krssak

--------------------------
Jozef KRSSAK


Re: pg_hba.conf and ident authentification

От:
Peter Eisentraut <peter_e@gmx.net>
Дата:
Jozef KRSSAK writes:

> 4. name of my account:
> krssak
>
> 5. pg_hba.conf:
> local   rocnikovy                                       trust
> host    rocnikovy       127.0.0.1       255.255.255.255 ident   map
>
> 6. pg_ident.conf:
> map     krssak  jozok
>
> 7. create user jozok;

> 9.
> krssak@pec:~$ psql -h localhost -d rocnikovy
> Connection to database 'rocnikovy' failed.
> IDENT authentication failed for user 'krssak'

You need to instruct psql to connect as database user 'jozok'.  Otherwise
it will default to 'krssak' and your careful setup is for nought.  See
option '-u'.

-- 
Peter Eisentraut      peter_e@gmx.net       http://yi.org/peter-e/

Re: pg_hba.conf and ident authentification

От:
root <root@dennis.veritime.com>
Дата:
Check the file permissions on pg_hba.conf, I beat my head against the wall with
a similar situation.

Rodney Hampton
FAQ