LINUX.ORG.RU
решено ФорумAdmin

Аутентификация в PostgreSQL через PAM

 , ,


0

3

Пытаюсь настроить сабж. Но никак не выходит каменный цветок.

----pg_hba.conf---
host all all 192.168.1.0/24 pam pamservice=postgresql-9.2
----pg_hba.conf---

----/etc/pam.d/postgresql-9.2----
auth include system-auth
account include system-auth
session include system-auth
----/etc/pam.d/postgresql-9.2----

----/etc/pam.d/system-auth----
auth required pam_env.so
auth sufficient pam_unix.so try_first_pass likeauth nullok
auth required pam_deny.so
auth required pam_permit.so

account required pam_unix.so

password required pam_cracklib.so difok=2 minlen=8 dcredit=2 ocredit=2 retry=3
password sufficient pam_unix.so nullok sha256 shadow use_authtok
password required pam_deny.so

session required pam_limits.so
session required pam_unix.so
----/etc/pam.d/system-auth----

Однако при попытке логиниться постгря выдаёт:
#psql -h 192.168.1.2 postgres
Password:
psql: FATAL: PAM authentication failed for user «testpam»

Хотя ssh и локальный логин в для пользователя работает нормально.

В логах пишеться вот это:
------------------------------
Jul 24 05:36:01 testserver unix_chkpwd[20014]: check pass; user unknown
Jul 24 05:36:01 testserver authentication: pam_unix(postgresql-9.2:auth): conversation failed
Jul 24 05:36:01 testserver authentication: pam_unix(postgresql-9.2:auth): auth could not identify password for [testpam]
Jul 24 05:36:06 testserver unix_chkpwd[20019]: check pass; user unknown
Jul 24 05:36:06 testserver unix_chkpwd[20020]: check pass; user unknown
Jul 24 05:36:06 testserver unix_chkpwd[20020]: password check failed for user (testpam)
Jul 24 05:36:06 testserver authentication: pam_unix(postgresql-9.2:auth): authentication failure; logname= uid=70 euid=70 tty= ruser= rhost= user=testpam
-------------------------------
Поможите люди добрыя, куда ещё копать не понимаю.

★★★★★

Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.