跨域 – AD组成员更改不反映在winbind中

我有类似的情况在这个线程在AD组成员变化不反映在winbind信息 。 唯一的区别是,这只发生在我的scheme的“跨域”。

这是我的configuration – http://pastebin.ca/3035431 …

我将不胜感激,如果有人可以给我一些启示:

(1)如何让“id”命令反映正确的组员资格。

(2)在Active Directory中进行更改后,如何使Winbind自动反映组成员资格。

谢谢!

在尝试我build议的之前,理解它可能会重置由Samba创build的UID / GID映射。 我这样做是因为我所关心的一切都来自Active Directory rfc2307,所以我很乐意擦拭Samba / Winbinddcaching并重新开始。

终于为我工作的是从/ var / cache / samba中删除所有文件。

我最近斗争得到组列表更新只是一个顽固的用户ID。 当然我的用户名。

我不相信我处于跨域的情况,但是这是可能的。 我在一个大型的多域Active Directory中,但只与一个域中的用户和组合作。

我尝试了许多尝试,包括“net cache flush”,为winbindd添加–no-caching,并从/ var / lib / samba中删除group_mapping.tdb,winbindd_idmap.tdb和winbindd_cache.tdb。

下面是一个清除Samba / Winbinddcaching文件的脚本:

#!/usr/bin/bash # # Quicky for backing up and removing the # Samba / Winbindd cache files # # This solution worked when a single users group # list would not update when changed in Active # directory. # # # Environment # # CentOS 7 with all updates as of 20150828 # Sernet Samba 4.2.3 - Version 4.2.3-SerNet-RedHat-18.el7 # /usr/bin/sh /etc/init.d/sernet-samba-smbd stop /usr/bin/sh /etc/init.d/sernet-samba-winbindd stop /usr/bin/sh /etc/init.d/sernet-samba-nmbd stop cd /var /usr/bin/tar cbzf 512 samba_var_backup_`date '+%Y%m%d_%H%M%S'`.tgz cache/samba lib/samba log/samba /usr/bin/find cache/samba -type f -exec /usr/bin/rm -f {} \; /usr/bin/rm -f lib/samba/group_mapping.tdb /usr/bin/rm -f lib/samba/winbindd_idmap.tdb /usr/bin/rm -f lib/samba/winbindd_cache.tdb /usr/bin/sh /etc/init.d/sernet-samba-nmbd start /usr/bin/sh /etc/init.d/sernet-samba-winbindd start /usr/bin/sh /etc/init.d/sernet-samba-smbd start 

我相信我创造了导致我的用户ID不更新的情况。 在这个CentOS 7系统上,我开始尝试使用内build于sssd和Samba的CentOS 7(我认为是Samba 4.1.x)与Active Directory交谈的“realm”命令和SSSD方法。

上海可持续发展处几乎奏效,但速度太慢。 像“id”和“groups”这样的命令非常慢。 它认为桑巴挣扎,因为看起来太慢了。

我决定尝试最新的Samba 4.2.x,因为新的winbindd和默认较大的io。

Sernet Samba / Winbindd 4.2.3似乎工作得很好。 桑巴joinActive Directory没有问题。 命令行“id”和“groups”在第一次查找后特别快。

这里是我的smb.conf供参考:

 [global] workgroup = PROJECTS security = ads realm = PROJECTS.EXAMPLE.NET kerberos method = secrets and keytab max log size = 50000 log level = 2 template homedir = /home/%U template shell = /bin/bash idmap config PROJECTS : default = yes idmap config PROJECTS : backend = ad idmap config PROJECTS : schema_mode = rfc2307 idmap config PROJECTS : range = 10000-9999999999 idmap config *:backend = tdb idmap config *:range = 2000-3999 winbind nss info = rfc2307 winbind use default domain = yes winbind offline logon = no winbind enum groups = yes winbind enum users = yes winbind refresh tickets = yes # # 20150827 by Joe # Comment out expand groups for now # I added it trying to solve nested groups not working # correctly. Look ups slowed down when I added this and # did not solve the problem for my login. # ## winbind expand groups = 3 os level = 0 local master = no domain master = no preferred master = no # ------------------ Options Joe Likes ------------------------ # path = /tmp force create mode = 0775 force directory mode = 2775 unix extensions = no wide links = yes load printers = no map archive = no map readonly = permissions nt acl support = no #============================ Share Definitions ============================== [projects] path = /disks/projects/projects_share comment = Projects Storage writeable = Yes browseable = yes guest ok = no 

看来,这删除caching,并强制winbind从ADC拉动信息:

 service winbind stop rm /var/cache/samba/netsamlogon_cache.tdb service winbind start