pam_sss acesso negado com autenticação kerberos ok

1

Estou tentando usar sssd com autenticação kerberos e ldap no Ubuntu 18.04 (servidor e máquina cliente). No lado do cliente Ubuntu eu instalei sssd sssd-tools packages. Mas quando eu quero entrar no alice, um usuário do meu ldap, eu não posso. Eu posso ver que o servidor entrega o ticket (nos logs do servidor kerberos) e o cliente recebe o ticket no cache. Mkhomedir está bem presente em /etc/pam.d/commom-session.

Eu descobri que o mkhomedir deveria ser habilitado, então eu corri pam-auth-update --package mkhomedir mas nada mudou.

O auth.log diz que:

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)'

O getent passwd <ldap user> funciona. Eu também adicionei o ao krb5.keytab do cliente.

Aqui meus arquivos de configuração.

arquivo 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

arquivo 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

Eu tenho pam_sss.so em arquivos pam.d:

# /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

Você sabe se sssd precisa de libpam_krb5.so? Se você tem alguma idéia, ou se precisar de mais informações, não hesite! Obrigado.

    
por Charles 20.07.2018 / 09:44

0 respostas