We have pam_access enabled and correctly allowed/denying users based on the rules in place. One such rule looks up LDAP backed NIS groups
+ : @hostname-granted : ALL
Putting tuples in ldap work for usernames
(,test_user,)
Meaning 'test_user' would be granted access into the host.
nisNetgroups also support memberNisNetgroup for nested netgroups. This works too and will find users in the subgroups.
The issue we have is if we specify another ldap backed posixGroup, the lookups fail to find any users as they are looking for a netgroup and don't find the group.
We are using sssd, these are the debug logs of the lookup from it
(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.
Is there any way to get pam_access to lookup the users in the posix groups when the groups are set in the nisNetGroup? I know I can add the posix groups directly into the pam_access referenced file, but that isn't a workable option.