SSSD ldap error: Cannot contact any KDC

Did you already send the /etc/krb5.conf of this server in another thread? Could you paste it here again?

Also the output of

config show sssd
config show dns
config show nsdc
cat /etc/hosts

Edit: attach also the output of

journalctl -M nsdc -u samba | grep 'krb5_init_context failed'

If the grep matches, this could be a workaround:

cp -v /var/lib/machines/nsdc/var/lib/samba/private/krb5.conf /var/lib/machines/nsdc/etc/krb5.conf 
systemctl -M nsdc restart samba

Also ensure the domain/realm is present in /etc/krb5.conf

# 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]
 dns_lookup_realm = false
 ticket_lifetime = 24h
 renew_lifetime = 7d
 forwardable = true
 rdns = false
# default_realm = EXAMPLE.COM
 default_ccache_name = KEYRING:persistent:%{uid}

 default_realm = AD.MYDOM.COM
[realms]
# EXAMPLE.COM = {
#  kdc = kerberos.example.com
#  admin_server = kerberos.example.com
# }

 AD.MYDOM.COM = {
 }

[domain_realm]
# .example.com = EXAMPLE.COM
# example.com = EXAMPLE.COM
 ad.mydom.com = AD.MYDOM.COM
 .ad.mydom.com = AD.MYDOM.COM
1 Like