我试图在Ubuntu 18.04(服务器和客户端计算机)上将sssd与kerberos身份验证和ldap结合使用。在Ubuntu客户端,我安装了sssd sssd-tools
软件包。但是,当我要登录ldap的用户alice时,我不能。我可以看到服务器发送了票证(在服务器kerberos的日志中),而客户端在高速缓存中收到了票证。 Mkhomedir很好地存在于/etc/pam.d/commom-session中。
我发现应该启用mkhomedir,因此我运行了pam-auth-update --package mkhomedir
,但没有任何改变。
auth.log表示:
Jul 19 14:30:12 virtualBox gdm-password]: pam_unix(gdm-password:auth): authentication failure; logname= uid=0 euid=0 tty=/dev/tty1 ruser= rhost= user=alice
Jul 19 14:30:13 virtualBox gdm-password]: pam_sss(gdm-password:auth): authentication success; logname= uid=0 euid=0 tty=/dev/tty1 ruser= rhost= user=alice
Jul 19 14:30:13 virtualBox gdm-password]: pam_sss(gdm-password:account): Access denied for user alice: 6 (Autorisation refusée)
Jul 19 14:30:32 virtualBox gdm-password]: pam_unix(gdm-password:auth): authentication failure; logname= uid=0 euid=0 tty=/dev/tty1 ruser= rhost= user=alice
Jul 19 14:30:32 virtualBox gdm-password]: pam_sss(gdm-password:auth): authentication failure; logname= uid=0 euid=0 tty=/dev/tty1 ruser= rhost= user=alice
Jul 19 14:30:32 virtualBox gdm-password]: pam_sss(gdm-password:auth): received for user alice: 17 (Échec lors de la définition des informations d'identification de l'utilisateur)
Jul 19 14:30:39 virtualBox gdm-password]: pam_unix(gdm-password:auth): authentication failure; logname= uid=0 euid=0 tty=/dev/tty1 ruser= rhost= user=alice
Jul 19 14:30:39 virtualBox gdm-password]: pam_sss(gdm-password:auth): authentication success; logname= uid=0 euid=0 tty=/dev/tty1 ruser= rhost= user=alice
Jul 19 14:30:39 virtualBox gdm-password]: pam_sss(gdm-password:account): Access denied for user alice: 6 (Autorisation refusée)`
getent passwd <ldap user>
有效。我也将其添加到客户端的krb5.keytab。
这是我的配置文件。
sssd.conf文件:
[sssd]
debug_level = 0xFFF0
config_file_version = 2
services = nss,pam
domains = STAGENFS.FR
[nss]
debug_level = 0xFFF0
filter_users = root
filter_groups = root
[pam]
debug_level = 0xFFF0
offline_credentials_expiration = 1
[domain/STAGENFS.FR]
debug_level = 0xFFF0
ldap_schema = rfc2307
ldap_search_base = ou=tl
id_provider = ldap
auth_provider = krb5
chpass_provider = krb5
access_provider = ldap
ldap_uri = ldaps://ldap02.stagenfs.fr
ldap_referrals = False
ldap_id_use_start_tls = False
cache_credentials = True
account_cache_expiration = 1
enumerate = True
ldap_default_bind_dn = cn=proxyuser,ou=private,ou=tl
ldap_default_authtok_type = password
ldap_default_authtok = ProxyUser123#
ldap_tls_cacert = /etc/ssl/certs/cacert.pem
krb5_realm = STAGENFS.FR
krb5_canonicalize = False
krb5_server = kdc.stagenfs.fr
krb5_kpasswd = kdc.stagenfs.fr
krb5_ccachedir = /cache
nsswitch文件:
# /etc/nsswitch.conf
#
# Example configuration of GNU Name Service Switch functionality.
# If you have the `glibc-doc-reference' and `info' packages installed, try:
# `info libc "Name Service Switch"' for information about this file.
passwd: compat systemd sss
group: compat systemd sss
shadow: compat sss
gshadow: files
hosts: files mdns4_minimal [NOTFOUND=return] dns myhostname
networks: files
protocols: db files
services: db files sss
ethers: db files
rpc: db files
netgroup: nis sss
sudoers: files sss
我在pam.d文件中有pam_sss.so:
# /etc/pam.d/common-account
account [default=bad success=ok user_unknown=ignore] pam_sss.so
# /etc/pam.d/common-auth
auth [success=1 default=ignore] pam_sss.so use_first_pass
# /etc/pam.d/common-password
password sufficient pam_sss.so use_authtok
# /etc/pam.d/common-session
session required pam_mkhomedir.so skel=/etc/skel/
session optional pam_sss.so
您知道sssd是否需要libpam_krb5.so吗? 如果您有任何想法,或者需要更多信息,请不要犹豫!谢谢。