libpam-ldapd不寻找二级组

我正在从libpam-ldap迁移到libpam-ldapd 。 我在从LDAP收集辅助组时遇到了一些麻烦。

libpam-ldap上 ,我在/etc/ldap.conf文件中有这个:

 nss_schema rfc2307bis
 nss_base_passwd ou =人,ou = CITIUS,dc = inv,dc = usc,dc = es
 nss_base_shadow ou =人,ou = CITIUS,dc = inv,dc = usc,dc = es
 nss_base_group ou =组,ou = CITIUS,dc = inv,dc = usc,dc = es
 nss_map_attribute uniqueMember成员

映射在那里,因为我使用groupOfNames而不是groupOfUniqueNames LDAP类的组,所以命名成员的属性被命名为member而不是uniqueMember

现在,我想要使用libpam-ldapd来做同样的事情,但是我无法使它工作。 这是我的/etc/nslcd.conf的相关部分:

 base passwd ou = People,ou = CITIUS,dc = inv,dc = usc,dc = es
基础阴影ou = People,ou = CITIUS,dc = inv,dc = usc,dc = es
基组ou = Groups,ou = CITIUS,dc = inv,dc = usc,dc = es
映射组uniqueMember成员

这是nslcd的debugging输出,当用户进行身份validation时:

 nslcd:[8b4567] DEBUG:从pid = 12090 uid = 0 gid = 0的连接
 nslcd:[8b4567] DEBUG:nslcd_passwd_byuid(4004)
 (“(&(objectClass = posixAccount)(uidNumber = 4004))”。 )
 nslcd:[8b4567] DEBUG:ldap_initialize(ldap://172.16.54.31/)
 nslcd:[8b4567] DEBUG:ldap_set_rebind_proc()
 nslcd:[8b4567] DEBUG:ldap_set_option(LDAP_OPT_PROTOCOL_VERSION,3)
 nslcd:[8b4567] DEBUG:ldap_set_option(LDAP_OPT_DEREF,0)
 nslcd:[8b4567] DEBUG:ldap_set_option(LDAP_OPT_TIMELIMIT,10)
 nslcd:[8b4567] DEBUG:ldap_set_option(LDAP_OPT_TIMEOUT,10)
 nslcd:[8b4567] DEBUG:ldap_set_option(LDAP_OPT_NETWORK_TIMEOUT,10)
 nslcd:[8b4567] DEBUG:ldap_set_option(LDAP_OPT_REFERRALS,LDAP_OPT_ON)
 nslcd:[8b4567] DEBUG:ldap_set_option(LDAP_OPT_RESTART,LDAP_OPT_ON)
 nslcd:[8b4567] DEBUG:ldap_simple_bind_s(“uid = ubuntu,ou = Applications,ou = CITIUS,dc = inv,dc = usc,dc = es”,“*****”)(uri =“ldap:/ /172.16.54.31/“)
连接到LDAP服务器的nslcd:[8b4567] ldap://172.16.54.31/
 nslcd:[8b4567] DEBUG:ldap_result():结果结束
 nslcd:[7b23c6] DEBUG:连接来自pid = 15906 uid = 0 gid = 2000
 nslcd:[7b23c6] DEBUG:nslcd_pam_authc(“jorge.suarez”,“”,“su”,“***”)
 ()(&= objectClass = posixAccount)(uid = jorge.suarez)nslcd:[7b23c6] DEBUG:myldap_search(base =“ou = People,ou = CITIUS,dc = inv,dc = usc,dc = es” )“)
 nslcd:[7b23c6] DEBUG:ldap_initialize(ldap://172.16.54.31/)
 nslcd:[7b23c6] DEBUG:ldap_set_rebind_proc()
 nslcd:[7b23c6] DEBUG:ldap_set_option(LDAP_OPT_PROTOCOL_VERSION,3)
 nslcd:[7b23c6] DEBUG:ldap_set_option(LDAP_OPT_DEREF,0)
 nslcd:[7b23c6] DEBUG:ldap_set_option(LDAP_OPT_TIMELIMIT,10)
 nslcd:[7b23c6] DEBUG:ldap_set_option(LDAP_OPT_TIMEOUT,10)
 nslcd:[7b23c6] DEBUG:ldap_set_option(LDAP_OPT_NETWORK_TIMEOUT,10)
 nslcd:[7b23c6] DEBUG:ldap_set_option(LDAP_OPT_REFERRALS,LDAP_OPT_ON)
 nslcd:[7b23c6] DEBUG:ldap_set_option(LDAP_OPT_RESTART,LDAP_OPT_ON)
 nslcd:[7b23c6] DEBUG:ldap_simple_bind_s(“uid = ubuntu,ou = Applications,ou = CITIUS,dc = inv,dc = usc,dc = es”,“*****”)(uri =“ldap:/ /172.16.54.31/“)
连接到LDAP服务器的nslcd:[7b23c6] ldap://172.16.54.31/
 nslcd:[7b23c6] DEBUG:ldap_initialize(ldap://172.16.54.31/)
 nslcd:[7b23c6] DEBUG:ldap_set_rebind_proc()
 nslcd:[7b23c6] DEBUG:ldap_set_option(LDAP_OPT_PROTOCOL_VERSION,3)
 nslcd:[7b23c6] DEBUG:ldap_set_option(LDAP_OPT_DEREF,0)
 nslcd:[7b23c6] DEBUG:ldap_set_option(LDAP_OPT_TIMELIMIT,10)
 nslcd:[7b23c6] DEBUG:ldap_set_option(LDAP_OPT_TIMEOUT,10)
 nslcd:[7b23c6] DEBUG:ldap_set_option(LDAP_OPT_NETWORK_TIMEOUT,10)
 nslcd:[7b23c6] DEBUG:ldap_set_option(LDAP_OPT_REFERRALS,LDAP_OPT_ON)
 nslcd:[7b23c6] DEBUG:ldap_set_option(LDAP_OPT_RESTART,LDAP_OPT_ON)
 nslcd:[7b23c6] DEBUG:ldap_simple_bind_s(“uid = jorge.suarez,ou = People,ou = CITIUS,dc = inv,dc = usc,dc = es”,“*****”)(uri =“ldap ://172.16.54.31/“)
连接到LDAP服务器的nslcd:[7b23c6] ldap://172.16.54.31/
 nslcd:[7b23c6] DEBUG:myldap_search(base =“uid = jorge.suarez,ou = People,ou = CITIUS,dc = inv,dc = usc,dc = es”,filter =“(objectClass = posixAccount)”)
 nslcd:[7b23c6] DEBUG:ldap_unbind()
 nslcd:[3c9869] DEBUG:从pid = 15906的连接uid = 0 gid = 2000
 nslcd:[3c9869] DEBUG:nslcd_pam_sess_o(“jorge.suarez”,“uid = jorge.suarez,ou = People,ou = CITIUS,dc = inv,dc = usc,dc = es”,“su”,“/ dev /pts/7","","jorge.suarez“)

在我看来,它甚至不会去寻找团体。 我做错了什么? 我看不到任何与我的文档上的问题信息有关的东西。 我可能不了解map选项如何工作。

我相信map group参数需要与相应的filter group参数相关联。 以下是我如何使用它连接到Active Directory:

 filter passwd (&(objectClass=user)(memberOf:1.2.840.113556.1.4.1941:=CN=Linux-SA,OU=Groups,DC=global,DC=example,DC=com)(!(objectClass=computer))(uidNumber=*)(unixHomeDirectory=*)(!(userAccountControl:1.2.840.113556.1.4.803:=2))) map passwd uid sAMAccountName map passwd homeDirectory unixHomeDirectory map passwd gecos displayName map passwd loginShell "/bin/bash" filter shadow (&(objectClass=user)(!(objectClass=computer))(uidNumber=*)(unixHomeDirectory=*)) map shadow uid sAMAccountName map shadow shadowLastChange pwdLastSet filter group (&(objectClass=group)(gidNumber=*)) map group uniqueMember member