我有一个已加入域的服务器,配置了 sssd。在 sssd.conf 中,我使用
ad_access_filter = (memberof=CN=CustomGroup,OU=Security Group,DC=company,DC=com)
这对以下用户有效,CustomGroup
但对Nested_CustomGroup
属于以下成员的组中的用户无效:CustomGroup
我的 sssd.conf 如下所示:
[sssd]
domains = company.com
config_file_version = 2
services = nss, pam
[domain/company.com]
ad_domain = company.com
krb5_realm = COMPANY.COM
cache_credentials = True
id_provider = ad
krb5_store_password_if_offline = True
default_shell = /bin/bash
ldap_id_mapping = True
ignore_group_members = False
ldap_group_nesting_level = 2
use_fully_qualified_names = False
fallback_homedir = /home/%u
case_sensitive = false
access_provider = ad
auth_provider = ad
enumerate = false
ad_gpo_access_control = disabled
ad_access_filter = (memberof=CN=CustomGroup,OU=Security Group,DC=company,DC=com)
嵌套组用户登录期间的 sshd 日志记录:
server sshd[30781]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=x.x.x.x user=someuser
server sshd[30781]: pam_sss(sshd:auth): authentication success; logname= uid=0 euid=0 tty=ssh ruser= rhost=x.x.x.x user=someuser
server sshd[30781]: pam_sss(sshd:account): Access denied for user someuser: 6 (Permission denied)
server sshd[30781]: Failed password for someuser from x.x.x.x port 26241 ssh2
server sshd[30781]: fatal: Access denied for user someuser by PAM account configuration [preauth]
有什么想法吗?谢谢,
答案1
为了使用 LDAP 语法根据 Active Directory 查询帐户的递归或嵌套组成员身份,您需要使用 OID 1.2.840.113556.1.4.1941,这是LDAP_MATCHING_RULE_IN_CHAIN
或的OIDLDAP_MATCHING_RULE_TRANSITIVE_EVAL
对于你的情况,你需要调整访问过滤器以
(memberOf:1.2.840.113556.1.4.1941:=CN=CustomGroup,OU=Security Group,DC=company,DC=com)