Обсуждение: Postgresql 8.4 pam

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

Postgresql 8.4 pam

От
Jakub Gołębiewski
Дата:
Hi,

I'm trying to configure authentication to postgresql 8.4 on FreeBSD Current with pam, but when I restart the server I can't login into database using pam authentication.

My  pg_hba.conf looks:
local  all all md5
host    all     all     192.168.1.0/24 pam     pamservice=/etc/pam.d/postgres

and my file in pam.d directory looks:

auth            sufficient      pam_opie.so             no_warn no_fake_prompts
auth            requisite       pam_opieaccess.so       no_warn allow_local
auth            required        pam_unix.so              no_warn try_first_pass

account         required        pam_login_access.so
account         required        pam_unix.so

session         required        pam_permit.so


password        required        pam_unix.so            no_warn try_first_pass

when i try to connetc from remote host I get information: psql: FATAL:  PAM authentication failed for user "golebiej"

in postgres log I see that packter wiht password came to server but it dosen't authenticate me

ep 29 16:55:09  postgres[1215]: [686-1] DEBUG:  forked new backend, pid=1297 socket=8
Sep 29 16:55:09  postgres[1297]: [686-1] LOG:  connection received: host=192.168.1.24 port=15150
Sep 29 16:55:09  postgres[1297]: [687-1] DEBUG:  received password packet
Sep 29 16:55:09  postgres[1297]: [688-1] LOG:  pam_authenticate failed: authentication error
Sep 29 16:55:09  postgres[1297]: [689-1] FATAL:  PAM authentication failed for user "golebiej"
Sep 29 16:55:09  postgres[1297]: [690-1] DEBUG:  shmem_exit(1): 0 callbacks to make
Sep 29 16:55:09  postgres[1297]: [691-1] DEBUG:  proc_exit(1): 1 callbacks to make
Sep 29 16:55:09  postgres[1297]: [692-1] DEBUG:  exit(1)
Sep 29 16:55:09  postgres[1297]: [693-1] DEBUG:  shmem_exit(-1): 0 callbacks to make
Sep 29 16:55:09  postgres[1297]: [694-1] DEBUG:  proc_exit(-1): 0 callbacks to make
Sep 29 16:55:09  postgres[1215]: [687-1] DEBUG:  reaping dead processes
Sep 29 16:55:09  postgres[1215]: [688-1] DEBUG:  server process (PID 1297) exited with exit code 1

Is anybody can help me solve this problem?

Best regards,
Kuba

Re: Postgresql 8.4 pam

От
Tom Lane
Дата:
=?ISO-8859-2?Q?Jakub_Go=B3=EAbiewski?= <jakub21@gmail.com> writes:
> I'm trying to configure authentication to postgresql 8.4 on FreeBSD Current
> with pam, but when I restart the server I can't login into database using
> pam authentication.

You'll need to check your PAM documentation, but if this is trying to
read the Unix password file directly then it won't work, because
postgres doesn't run as root.  You'd need to have an external helper
program of some sort.  Afraid I don't use PAM enough to offer specifics.

            regards, tom lane

Re: Postgresql 8.4 pam

От
Alvaro Herrera
Дата:
Jakub Gołębiewski escribió:

> when i try to connetc from remote host I get information: psql: FATAL:  PAM
> authentication failed for user "golebiej"

Please try psql -W

--
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.