如何在使用LDAP连接到AD服务器的Linux服务器上启用组枚举?

我有一服务器,需要在中央Active Directory林中进行身份validation。 ADpipe理员也好心地安装了UNIX AD扩展和NIS,所以我有很多的LDAP属性可以使用。

validation绑定正在工作,用户login也是如此。 我错过的一块是使组枚举正确工作的魔力。

有没有人有任何特定的/etc/ldap.conf或PAM的魔法,我可以使团体正常工作?

以机智:

 [root@hostname ~]# groups username id: cannot find name for group ID 1768498755 [root@hostname ~]# 

(该ID是通过gidNumber指定的默认组。

谢谢!

添加到/etc/nsswitch.conf:

(如果需要: passwd: files sssgroup: files sss

安装sssd并将其configuration为search适当的空间( /etc/sssd/sssd.conf ):

 [sssd] domains = LDAP [domains/LDAP] ldap_schema = rfc2307bis id_provider = ldap auth_provider = ldap ldap_uri = ldap://localhost ldap_search_base = ou=users,o=company ldap_user_search_base = ou=users,o=company ldap_group_search_base = ou=groups,o=company ldap_tls_reqcert = allow cache_credentials = true enumerate = true min_id = 1 

尝试将以下内容添加到/etc/ldap.conf

 nss_base_group ou=your,o=base 

并确保你也看看ldap来映射gid的。 /etc/nsswitch.conf应该包含如下内容:

 group: files ldap