Active Directory和linux nslcd绑定,无需扩展AD架构

问题描述 投票:3回答:2

我需要将Linux客户端绑定到Windows Server 2012 Active Directory。我有一个测试环境,我用samba-winbind-kerberos和nslcd成功地使用用户进行身份验证。但是,当使用samba-winbind-kerberos时,我能够实现这一点而无需扩展AD模式以包含UNIX属性(UID / GID,主目录,shell),因为smb.conf有一个idmap选项,指定起始范围

idmap config *:range = 11000-20000

这将负责AD用户的UID / GID的unix映射。

如果我没有在AD中启用UNIX属性,那么我将在nslcd调试日志中收到错误

uidNumber: missing

有没有办法在nslcd / libnss_ldap中使用相同的功能,这样我就不必在Windows服务器2012上扩展AD架构了?由于其远程代码执行漏洞,我不喜欢在生产环境中使用samba。

linux windows active-directory windows-server-2012 openldap
2个回答
3
投票

现在这是不可能的。 nslcd根据其文档没有可用的id映射,这需要扩展AD模式以具有unix属性。


2
投票

使用CentOS Linux版本7.4.1708(Core)和nslcd版本0.8.13对抗Windows 2016 AD而没有任何架构扩展,我能够配置它并使其今天正常工作。

我主要遵循Serverfault文章“LDAP authentication on CentOS 7”,并且必须在/etc/nslcd.conf中使用Alternative mappings for Active Directoryreplace the SIDs in the objectSid mappings with the value for your domain部分。

对于“Get SID by its objectSid using ldapsearch”,我使用了linked script

其他映射设置为

filter passwd (&(objectClass=user)(objectClass=person)(!(objectClass=computer)))
map    passwd uid           sAMAccountName
map    passwd uidNumber     objectSid:<yourValue>
map    passwd gidNumber     primaryGroupID
map    passwd homeDirectory "/home/$sAMAccountName"
map    passwd gecos         displayName
map    passwd loginShell    "/bin/bash"
map     group gidNumber      primaryGroupID
© www.soinside.com 2019 - 2024. All rights reserved.