iboukris / rpms / samba

Forked from rpms/samba 4 years ago
Clone
f9f065e
From 5a084994144704a6c146b94f8a22cf57ce08deab Mon Sep 17 00:00:00 2001
f9f065e
From: Alexander Bokovoy <ab@samba.org>
f9f065e
Date: Mon, 7 Oct 2019 18:24:28 +0300
f9f065e
Subject: [PATCH] samba-tool: create working private krb5.conf
f9f065e
f9f065e
DNS update tool uses private krb5.conf which should have enough details
f9f065e
to authenticate with GSS-TSIG when running nsupdate.
f9f065e
f9f065e
Unfortunately, the configuration we provide is not enough. We set
f9f065e
defaults to not lookup REALM via DNS but at the same time we don't
f9f065e
provide any realm definition. As result, MIT Kerberos cannot actually
f9f065e
find a working realm for Samba AD deployment because it cannot query DNS
f9f065e
for a realm discovery or pick it up from the configuration.
f9f065e
f9f065e
Extend private krb5.conf with a realm definition that will allow MIT
f9f065e
Kerberos to look up KDC over DNS.
f9f065e
f9f065e
Signed-off-by: Alexander Bokovoy <ab@samba.org>
f9f065e
Reviewed-by: Andreas Schneider <asn@samba.org>
f9f065e
---
f9f065e
 source4/setup/krb5.conf | 8 ++++++++
f9f065e
 1 file changed, 8 insertions(+)
f9f065e
f9f065e
diff --git a/source4/setup/krb5.conf b/source4/setup/krb5.conf
f9f065e
index b1bf6cf907d..ad6f2818fb5 100644
f9f065e
--- a/source4/setup/krb5.conf
f9f065e
+++ b/source4/setup/krb5.conf
f9f065e
@@ -2,3 +2,11 @@
f9f065e
 	default_realm = ${REALM}
f9f065e
 	dns_lookup_realm = false
f9f065e
 	dns_lookup_kdc = true
f9f065e
+
f9f065e
+[realms]
f9f065e
+${REALM} = {
f9f065e
+	default_domain = ${DNSDOMAIN}
f9f065e
+}
f9f065e
+
f9f065e
+[domain_realm]
f9f065e
+	${HOSTNAME} = ${REALM}
f9f065e
-- 
f9f065e
2.21.0
f9f065e