Ubuntu 18.04/20.04 SSSD 配置问题

Ubuntu 18.04/20.04 SSSD 配置问题

首先我想说的是,我对 CentOS/RHEL 领域的经验比对 Ubuntu 配置的经验要多。我所构建的大多数 Ubuntu 系统都使用默认配置,或者我能够弄清楚该配置的 RHEL->Ubuntu 等效配置是什么。

我希望使用 samba 和 winbind 配置 SSSD,类似于https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html-single/integrating_rhel_systems_directly_with_windows_active_directory/index#connecting-rhel-systems-directly-to-ad-using-samba-winbind_integrating-rhel-systems-directly-with-active-directory。我尝试过几次直接使用 SSSD,当我加入时它会返回域信息,但我无法使用域帐户登录。

我可以成功加入该领域

realm join -v --user=myjoinuser mydomain.com
Successfully enrolled machine in realm

使用 getent 密码[电子邮件保护],我能够从活动目录中的用户检索信息:

[email protected]:*:[number]:[number]:Domain User:/home/[email protected]:/bin/bash

登录验证成功,然后因系统错误 4 而失败

pam_sss(login:auth): authentication success; logname= uid=0 euid=0 tty=/dev/pts/0 ruser= rhost= [email protected]
Could not autodiscover AD site value using DNS and ad_site option was not set in configuration. GPO will not work.
pam_sss(login:account): Access denied for user [email protected]: 4 (System error)

我还看到 sssd-pam 启动失败,其中提到 sssd 配置包含 pam 模块,但它正尝试通过套接字激活?

因此,归根结底,要么了解 SSSD 如何尝试自动发现 AD 站点(这样我就可以向中央 IT 人员提出正确的问题),要么将其配置为使用 samba/winbind,就像我在 CentOS/RHEL 端所做的那样。我缺少 winbind 配置的 winbind_krb5_localauth.so 插件,无法在 Ubuntu 提供的 samba/krb5 软件包中找到它。任何有关将其配置为使用 Active Directory 的信息都将不胜感激。

答案1

嗨,这是对我来说的解决方案:

在文件 /etc/sssd/sssd.conf 中添加以下[domain/domain.local]选项

ad_site = Default-First-Site-Name # Your site name Active Directory, the default site name is Default-First-Site-Name

相关内容