大网数据广告活动
服务器运维问答

Should domain_realm point to a domain controller or KDC, or is it just the default_realm name?

· 52CE 我爱测

In /etc/krb5.conf , given the folowing default_realm , should [realms].default_domain point at the default_realm or a Domain Controller (DC) or Key Distribution Denter (KDC)? ada and adb are Windows Server DCs & KDCs. The domain …

问题原文

原帖链接 · Louis Waweru · CC BY-SA 4.0

In /etc/krb5.conf, given the folowing default_realm, should [realms].default_domain point at the default_realm or a Domain Controller (DC) or Key Distribution Denter (KDC)?

ada and adb are Windows Server DCs & KDCs. The domain members are systems running supported Ubuntu Server releases, joined as domain members through Samba and Winbind.

The DCs provide authentication for logging in through ssh and accessing SMB shares that reside on the Ubuntu servers. This is used to control what domain users and groups can or can access on various Ubuntu servers.

Ex 1:

[libdefaults]
ticket_lifetime = 24h
default_realm = DEPT.EXMAMPLE.COM
default_tgs_entypes = rc4-hmac des-cbc-md5
default_tkt__enctypes = rc4-hmac des-cbc-md5
permitted_enctypes = rc4-hmac des-cbc-md5
dns_lookup_realm = false
dns_lookup_kdc = true
dns_fallback = yes

[realms]
DEPT.EXMAMPLE.COM = {
  kdc = ada.dept.example.com
  kdc = adb.dept.example.com
  admin_server = ada.dept.example.com
  master_kdc = ada.dept.example.com
  default_domain = dept.example.com
}

[domain_realm]
.dept.example.com = DEPT.EXMAMPLE.COM
dept.example.com = DEPT.EXMAMPLE.COM

Ex2

[libdefaults]
ticket_lifetime = 24h
default_realm = DEPT.EXMAMPLE.COM
default_tgs_entypes = rc4-hmac des-cbc-md5
default_tkt__enctypes = rc4-hmac des-cbc-md5
permitted_enctypes = rc4-hmac des-cbc-md5
dns_lookup_realm = false
dns_lookup_kdc = true
dns_fallback = yes

[realms]
DEPT.EXMAMPLE.COM = {
  kdc = ada.dept.example.com
  kdc = adb.dept.example.com
  admin_server = ada.dept.example.com
  master_kdc = ada.dept.example.com
  default_domain = dept.example.com
}

[domain_realm]
.dept.example.com = ADA.DEPT.EXMAMPLE.COM
dept.example.com = ADA.DEPT.EXMAMPLE.COM

Both configurations seem to work on a number of Ubuntu Servers, but I don't understand why, or which is correct.

已采纳解答

原帖链接 · EOhm · CC BY-SA 4.0

Your ex1 is correct, ex2 invalid.

From man page:

[realms]
Contains subsections keyed by Kerberos realm names which describe where to find the Kerberos servers for a particular realm, and other realm-specific information.
[domain_realm]
Contains relations which map subdomains and domain names to Kerberos realm names. This is used by programs to determine what realm a host should be in, given its fully qualified domain name.

and details about DOMAIN_REALM section:

The [domain_realm] section provides a translation from a hostname to the Kerberos realm name for the services provided by that host.

The tag name can be a hostname, or a domain name, where domain names are indicated by a prefix of a period ('.') character. The value of the relation is the Kerberos realm name for that particular host or domain. Host names and domain names should be in lower case.

If no translation entry applies, the host's realm is considered to be the hostname's domain portion

So it must not point directly to a (K)DC but to a realm, and is a mapping a bit more specifical than default_realm. In Your simple setup it is not needed at all, because .dept.example.com = DEPT.EXMAMPLE.COM is exactly what happens if there is no applying translation entry.
Thought dept.example.com = DEPT.EXMAMPLE.COM could kick in, but I doubt it is needed as You have the global default_realm specified which should be used if there is no definition of realm EXMAMPLE.COM found.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2019-10-18)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。