帶有嵌套 posixgroup 的 pam_access nisnetgroup

帶有嵌套 posixgroup 的 pam_access nisnetgroup

我們啟用了 pam_access 並根據現有規則正確允許/拒絕使用者。其中一項規則尋找 LDAP 支援的 NIS 群組

+ : @hostname-granted : ALL

將元組放入 LDAP 中以取得使用者名

(,test_user,)

這意味著“test_user”將被授予對主機的存取權限。

nisNetgroups 也支援嵌套網路群組的memberNisNetgroup。這也有效,並且會在子群組中找到使用者。

我們遇到的問題是,如果我們指定另一個 ldap 支援的 posixGroup,查找將無法找到任何用戶,因為他們正在尋找網路群組,但找不到該群組。

我們正在使用 sssd,這些是從中查找的調試日誌

(Fri Oct  2 11:42:08 2015) [sssd[be[LDAP]]] [sdap_attrs_add_ldap_attr] (0x2000): Adding original DN [cn=hostname-denied,ou=host access policy,ou=Groups,dc=demonware,dc=net] to attributes of [hostname-denied]
.
(Fri Oct  2 11:42:08 2015) [sssd[be[LDAP]]] [sdap_attrs_add_ldap_attr] (0x2000): Adding netgroup triple [(,test_user,)] to attributes of [hostname-denied].
(Fri Oct  2 11:42:08 2015) [sssd[be[LDAP]]] [sdap_attrs_add_ldap_attr] (0x2000): Adding original members [test_group] to attributes of [hostname-denied].
(Fri Oct  2 11:42:08 2015) [sssd[be[LDAP]]] [sdap_attrs_add_ldap_attr] (0x2000): Adding members [test_group] to attributes of [hostname-denied].
(Fri Oct  2 11:42:08 2015) [sssd[be[LDAP]]] [sdap_save_netgroup] (0x0400): Storing info for netgroup hostname-denied


(Fri Oct  2 11:42:08 2015) [sssd[be[LDAP]]] [sdap_get_netgroups_next_base] (0x0400): Searching for netgroups with base [dc=example,dc=com]
(Fri Oct  2 11:42:08 2015) [sssd[be[LDAP]]] [sdap_print_server] (0x2000): Searching 192.168.1.2
(Fri Oct  2 11:42:08 2015) [sssd[be[LDAP]]] [sdap_get_generic_ext_step] (0x0400): calling ldap_search_ext with [(&(cn=test_group)(objectclass=nisNetgroup))][dc=example,dc=com].
(Fri Oct  2 11:42:08 2015) [sssd[be[LDAP]]] [sdap_get_generic_ext_step] (0x1000): Requesting attrs: [objectClass]
(Fri Oct  2 11:42:08 2015) [sssd[be[LDAP]]] [sdap_get_generic_ext_step] (0x1000): Requesting attrs: [cn]
(Fri Oct  2 11:42:08 2015) [sssd[be[LDAP]]] [sdap_get_generic_ext_step] (0x1000): Requesting attrs: [memberNisNetgroup]
(Fri Oct  2 11:42:08 2015) [sssd[be[LDAP]]] [sdap_get_generic_ext_step] (0x1000): Requesting attrs: [nisNetgroupTriple]
(Fri Oct  2 11:42:08 2015) [sssd[be[LDAP]]] [sdap_get_generic_ext_step] (0x1000): Requesting attrs: [modifyTimestamp]
(Fri Oct  2 11:42:08 2015) [sssd[be[LDAP]]] [sdap_get_generic_ext_step] (0x2000): ldap_search_ext called, msgid = 3
(Fri Oct  2 11:42:08 2015) [sssd[be[LDAP]]] [sdap_process_result] (0x2000): Trace: sh[0x2245480], connected[1], ops[0x2251ca0], ldap[0x22683f0]
(Fri Oct  2 11:42:08 2015) [sssd[be[LDAP]]] [sdap_process_message] (0x4000): Message type: [LDAP_RES_SEARCH_RESULT]
(Fri Oct  2 11:42:08 2015) [sssd[be[LDAP]]] [sdap_get_generic_op_finished] (0x0400): Search result: Success(0), no errmsg set
(Fri Oct  2 11:42:08 2015) [sssd[be[LDAP]]] [sdap_get_netgroups_process] (0x0400): Search for netgroups, returned 0 results.

當在 nisNetGroup 中設定群組時,有什麼方法可以讓 pam_access 尋找 posix 群組中的使用者嗎?我知道我可以將 posix 群組直接添加到 pam_access 引用檔案中,但這不是一個可行的選項。

相關內容