Samba 4 AD域控制器上的winbind信息不一致

我在Debian Jessie(samba 4.2.10)上安装了一个Samba 4 AD域控制器。 一切工作正常,除了winbind给出错误的用户/组信息。

我有一个示例用户“testuser”和一个安全组“人”。 他们的UNIX属性设置如下:

testuser UNIX属性 人们组UNIX属性

然而winbind表明了这一点:

root@agnus:~# wbinfo -i testuser testuser:*:10010:100:Test User:/home/HOME/testuser:/bin/false 

UID匹配,但一切都是错误的。

我的smb.conf包含这个:

 # Global parameters [global] workgroup = HOME realm = HOME.LOCAL netbios name = AGNUS server role = active directory domain controller server services = s3fs, rpc, nbt, wrepl, ldap, cldap, kdc, drepl, winbindd, ntp_signd, kcc, dnsupdate idmap_ldb:use rfc2307 = yes idmap config *:backend = tdb idmap config *:range = 2000-9999 idmap config HOME:backend = ad idmap config HOME:schema_mode = rfc2307 idmap config HOME:range = 10000-99999 winbind nss info = rfc2307 winbind enum users = yes winbind enum groups = yes winbind normalize names = yes winbind use default domain = yes winbind refresh tickets = yes [netlogon] path = /var/lib/samba/sysvol/home.local/scripts read only = No [sysvol] path = /var/lib/samba/sysvol read only = No 

我的设置有什么问题?

基本上没什么。 您使用samba 4 AD DC以来缺less模板行。 Samba 4.2和4.3与getent passwd或wbinfo -u或id有不同的行为。

如果可能的话更新到4.4.3,在桑巴列表中的debs。 他们工作很好。 桑巴4.4.3需要winbind安装,ADDC和会员,但! 现在所有的输出可以是相同的。

和模板线。

  template homedir (G) When filling out the user information for a Windows NT user, the winbindd(8) daemon uses this parameter to fill in the home directory for that user. If the string %D is present it is substituted with the user's Windows NT domain name. If the string %U is present it is substituted with the user's Windows NT user name. Default: template homedir = /home/%D/%U template shell (G) When filling out the user information for a Windows NT user, the winbindd(8) daemon uses this parameter to fill in the login shell for that user. Default: template shell = /bin/false 

将这些添加到您的DC smb.conf。

最后一件事,请阅读: https : //www.brightbox.com/blog/2014/03/04/add-cacert-ubuntu-debian/这样的设置真的让它更容易。 更多的问题,请问桑巴列表。