我正在使用 Centos 7 通过 kerberos 对本地 Active Directory 用户进行身份验证。我以管理员身份加入了该领域,并且我可以通过它/使用它登录/ssh,nslookup运行良好,并且 命令行信息正在运行。当我创建另一个名为 test 的用户并尝试通过 Centos 登录时,我得到以下信息:
id: test: no such user
getent 密码测试没有返回任何内容
这是我的配置文件:
sssd.conf
domains = gio.server
config_file_version = 2
services = nss, pam
[domain/gio.server]
ad_domain = gio.server
krb5_realm = GIO.SERVER
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 = False
fallback_homedir = /home/%u
access_provider = ad
这里是krb5配置文件
# Configuration snippets may be placed in this directory as well
includedir /etc/krb5.conf.d/
includedir /var/lib/sss/pubconf/krb5.include.d/
[logging]
default = FILE:/var/log/krb5libs.log
kdc = FILE:/var/log/krb5kdc.log
admin_server = FILE:/var/log/kadmind.log
[libdefaults]
default = GIO.SERVER
dns_lookup_realm = true
dns_lookup_kdc = true
ticket_lifetime = 24h
renew_lifetime = 7d
forwardable = true
rdns = false
pkinit_anchors = FILE:/etc/pki/tls/certs/ca-bundle.crt
# default_realm = EXAMPLE.COM
default_ccache_name = KEYRING:persistent:%{uid}
default_realm = GIO.SERVER
[realms]
GIO.SERVER = {
kdc = gio.server:88
default_domain = gio.server
# kdc = kerberos.example.com
# admin_server = kerberos.example.com
}
[domain_realm]
# .example.com = EXAMPLE.COM
# example.com = EXAMPLE.COM
.gio.server = GIO.SERVER
gio.server = GIO.SERVER
但是当我使用sssctl 用户检查测试它返回了以下错误:
user: test
action: acct
service: system-auth
sss_getpwnam_r failed with [0].
User name lookup with [test] failed.
Unable to get user objectInfoPipe User lookup with [test] failed.
testing pam_acct_mgmt
pam_acct_mgmt: User not known to the underlying authentication module
PAM Environment:
- no env -
如果缺少什么请告诉我。
答案1
根本问题是计算机帐户缺少 AD 中用户帐户所需的特定属性的读取权限。
当用户被添加到域管理员时,权限继承将被禁用,并且某些权限被明确授予经过身份验证的用户。这允许服务器提取必要的属性来验证管理员,但不能验证普通用户。
要解决此问题,请向经过身份验证的用户或专门创建的安全组授予对域根目录应用于“后代用户对象”的“列出内容”、“读取所有属性”和“读取权限”权限。