我用CentOS把我的Centos Boxjoin了一个Windows Active Directory域
realm join --user=DomUser dom2.local
没有任何问题。 该域与Dom1具有单向的信任关系。 我们的Windows用户可以:
在我们的Linux Box(Dom2)中,只有Dom2 /用户可以login。我在网上发现了一些证据,sssd可以configuration两个域名,所以我在sssd config中添加了一个Block:
# cat /etc/sssd/sssd.conf [sssd] domains = dom1.local, dom2.local config_file_version = 2 services = nss, pam [domain/dom1.local] ad_domain = dom1.local krb5_realm = DOM1.LOCAL realmd_tags = manages-system joined-with-samba cache_credentials = True id_provider = ad krb5_store_password_if_offline = True default_shell = /bin/bash ldap_id_mapping = True use_fully_qualified_names = True fallback_homedir = /home/%u@%d access_provider = ad enumerate = True [domain/dom2.local] ad_domain = dom2.local krb5_realm = DOM2.LOCAL realmd_tags = manages-system joined-with-samba #cache_credentials = True cache_credentials = False id_provider = ad krb5_store_password_if_offline = True default_shell = /bin/bash ldap_id_mapping = True use_fully_qualified_names = True fallback_homedir = /home/%u@%d access_provider = ad enumerate = True
现在,如果我尝试用Dom2用户login,我得到以下内容:
pam_sss(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=host.dom1.local [email protected] pam_sss(sshd:auth): received for user [email protected]: 6 (Permission denied) Failed password for [email protected] from 10.10.0.10 port 34442 ssh2
有人成功地使用sssdconfiguration了两个AD Domains吗? 或者任何想法如何做到这一点?
EDIT1:
有了getent passwd,我可以看到来自两个域的所有用户,还有:
id [email protected] id [email protected]
工作也是如此。
您确实需要启用sssd日志并查看,请参阅https://docs.pagure.org/SSSD.sssd/users/troubleshooting.html
通常,当sssd切换到脱机模式时,由于其中一个服务器不可访问,PAM在auth期间返回错误6