Windows 上的 PHPPGAdmin - 根據 Active Directory 對使用者進行身份驗證

Windows 上的 PHPPGAdmin - 根據 Active Directory 對使用者進行身份驗證

我在屬於Windows網域的Windows機器上安裝了PHP、Apache 2.4和PostgreSQL 9.4.1。

我的pg_hba.conf

hostnossl   all  postgres     127.0.0.1/32       md5
hostnossl   all  all          127.0.0.1/32       sspi
hostssl     all  all          127.0.0.1/32       sspi
hostnossl   all  postgres     ::1/128            md5
hostnossl   all  soescript    ::1/128            md5
hostnossl   all  all          ::1/128            sspi
hostssl     all  all          ::1/128            sspi
hostssl     all  postgres     .mydomain.com      md5
hostssl     all  all          .mydomain.com      sspi

PostgreSQL 伺服器在 AD 帳戶下運行服務主體名稱特權(如描述的這裡)。我在 PostgreSQL 中建立了與我的 AD 帳戶同名的使用者帳戶。如上所述,我在同一台機器上安裝了 PHP 和 Apache。我安裝了 PHPPGAdmin - 一個基於 PHP 的 PostgreSQL Web 介面。

當我使用 PGAdmin(在 AD 帳戶下運行)直接連接到 PostgreSQL 時,一切都按預期工作 - 我可以使用我的網域憑證登入。

當我透過 Web 瀏覽器連接到 PHPPGAdmin 介面時,我無法使用我的網域憑證登入。

我得到的錯誤是:

LOG: connection received: host=::1 port=50395

LOG: provided user name (<my user name>) and authenticated user name (SYSTEM) do not match 
FATAL: SSPI authentication failed for user "<my user name>" DETAIL: Connection matched pg_hba.conf line 91: "hostssl all all ::1/128 sspi

LOG: connection received: host=::1 port=50396 

LOG: provided user name (<my user name>) and authenticated user name (SYSTEM) do not match 
FATAL: SSPI authentication failed for user "<my user name>" DETAIL: Connection matched pg_hba.conf line 90: "hostnossl all all ::1/128 sspi"

Apache 在本機系統帳戶下運行(如果您查看上面的錯誤,這是有意義的)。

我如何說服它起作用?

提前致謝。

相關內容