Linux – Using Samba with sssd

linuxlinux-networkingsambasssd

I have an OpenSUSE Tumbleweed server that is part of a Windows domain and uses sssd for user authentication. For ssh this is working fine but I cannot get it to work with Samba. When accessing a Samba share from a Windows client I get asked for a password multiple times but cannot access the share. In the journal on the linux server I see the following error message:

Aug 28 17:50:20 <server> smbd[3575]: [2020/08/28 17:50:20.751092,  0] ../../source3/auth/token_util.c:565(add_local_groups)
Aug 28 17:50:20 <server smbd[3575]:   add_local_groups: SID S-1-5-21-1909068044-192024690-1575050150-1861 -> getpwuid(10000) failed, is nsswitch configured?

nsswitch.conf:

passwd: compat sss
group: compat sss

smb.conf:

[global]
        workgroup = DOMAIN
        realm = DOMAIN.TLD
        interfaces = eth0, 172.20.0.0/16, 127.0.0.1/8
        security = ADS
        domain master = No
        ldap ssl = no
        idmap config DOMAIN : backend = sss
        idmap config DOMAIN : range = 10000-20000
        winbind refresh tickets = yes
        winbind use default domain = yes
        winbind offline logon = false
        winbind enum users = yes
        winbind enum groups = yes
#       passdb backend = tdbsam
#        kerberos method = secrets and keytab
#        kerberos method = secrets only
        kerberos method = system keytab
        map to guest = Bad User
        usershare allow guests = No
        client signing = yes
        client use spnego = yes

        log level = 3

        load printers = No
        printing = bsd
        printcap name = /dev/null
        disable spoolss = yes

sssd.conf:

[sssd]
config_file_version = 2
services = nss, pam
domains = domain.de

[nss]
filter_users = root
filter_groups = root

[pam]

[domain/domain.de]
ad_domain = domain.de
krb5_realm = DOMAIN.DE
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 = True
fallback_homedir = /home/%u@%d
access_provider = ad

The following commands are working as expected:

> id username@domain.de
> getent passwd domain\\username

What am I doing wrong?

Best Answer

To answer my own question: I switch to winbind for the domain authentication and that is working fine.