我试图在Windows(SID)和Linux(uid / gid)客户端上使用正确的ID进行samba共享。 问题在于uid和gid没有正确映射回SID,而SID也没有parsing为名称。 什么可能导致这个问题,如何解决?
什么工作
sudo mount -t cifs //ribonas2/test /mnt/ribonas2/smb/ -o domain=DOMAIN,username=paul.jaehne 什么都行不通
Unix User\和Unix Group\ (UNIX uid和gid在打开安全选项卡时很短的时间内也可见),而不是DOMAIN\作为用户和组的前缀 DOMAIN\whatever显示正确。 当我等待一段时间或查看另一台计算机的共享时,只显示SID(SID是正确的,但不parsing名称): 
Environement /configuration
realm join和net ads join sssd.conf :
[sssd] domains = domain.company.com config_file_version = 2 services = nss, pam [domain/domain.company.com] realmd_tags = manages-system joined-with-adcli ad_domain = domain.company.com krb5_realm = DOMAIN.COMPANY.COM id_provider = ad cache_credentials = True krb5_store_password_if_offline = True enumerate = True use_fully_qualified_names = False fallback_homedir = /home/%d/%u default_shell = /bin/bash # use uid and gid from active directory ldap_id_mapping = False # needed to use correct active directory properties (Windows Server 2003) ldap_schema = ad ldap_user_object_class = person ldap_user_name = msSFU30Name ldap_user_uid_number = msSFU30UidNumber ldap_user_gid_number = msSFU30GidNumber ldap_user_home_directory = msSFU30HomeDirectory ldap_user_shell = msSFU30LoginShell ldap_user_gecos = displayName ldap_group_object_class = group ldap_group_name = msSFU30Name ldap_group_gid_number = msSFU30GidNumber
smb.conf (来自标准configuration文件的设置缩进):
[global] server role = member server workgroup = DOMAIN realm = DOMAIN.COMPANY.COM security = ads password server = dc1.domain.company.com # shouldn't be necessary and same problem without this line idmap config * : backend = tdb idmap config * : range = 100000-999999 idmap config DOMAIN : backend = ad idmap config DOMAIN : range = 10000-20000 # the UNIX attributes are manually assigned in this range kerberos method = secrets and keytab server string = %h server (Samba, Ubuntu) dns proxy = no log file = /var/log/samba/log.%m log level = 10 max log size = 1000 syslog = 0 panic action = /usr/share/samba/panic-action %d passdb backend = tdbsam obey pam restrictions = yes unix password sync = yes passwd program = /usr/bin/passwd %u passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* . pam password change = yes map to guest = bad user usershare allow guests = yes # needed for Windows ACL/ACE vfs objects = acl_xattr map acl inherit = yes store dos attributes = yes [test] path = /srv/samba/test writable = yes
TL; DR :为什么不将UNIX属性parsing为SID,为什么SID不parsing为名称?
我有同样的情况。 我通过安装samba-winbind来修复它。 我认为,根源是桑巴不知道如何正确查找名称。 当您安装winbind时,smbd将使用winbind进行名称parsing。 否则,它只是使用Linux的UID,GID,这就是为什么你在Windows中看到Unix用户/ Unix组。
我无法解释更多,但希望这可以帮助你。