
昨天我使用 Arch Linux 和 Samba 4 設定了一個 Active Directory 伺服器,如下所示指導。
我甚至將客戶端添加到網域中,並且能夠在我的客戶端上成功登入。重新啟動後,它不再起作用,我無法再使用 Microsoft RSAT,我將此問題追蹤到返回的指令:kinit [email protected]
取得初始憑證時無法聯繫領域「INTERNAL.CORP.COM」的任何 KDC
試圖解決我的問題,我嘗試谷歌搜尋並發現這:
kinit(v5):在取得初始憑證時無法聯絡請求領域的任何 KDC
應用程式找不到 kerberos 伺服器。檢查防火牆、DNS 和 /etc/hosts。
但是,正如 adobe 發布的 Arch Linux 教程所指出的,我嘗試了一些命令來測試連接:
# host -t SRV _ldap._tcp.internal.corp.com.
# host -t SRV _kerberos._udp.internal.corp.com.
# host -t A core.internal.corp.com. #core is my server hostname
返回:
_ldap._tcp.internal.corp.com has SRV record 0 100 389 core.internal.corp.com.
_kerberos._udp.internal.corp.com has SRV record 0 100 88 core.internal.corp.com.
core.internal.corp.com has address 192.168.0.75
正如您在我的第二個命令中看到的那樣,我似乎實際上可以訪問 kerberos 服務。
這是我的一些設定檔:
/etc/krb5.conf (按照教程中的指示從 /var/lib/samba/private/krb5.conf 複製)
[libdefaults]
default_realm = INTERNAL.CORP.COM
dns_lookup_realm = false
dns_lookup_kdc = true
/etc/resolv.conf
# Generated by resolvconf
nameserver 192.168.0.75
nameserver 8.8.8.8
search internal.corp
namserver 127.0.0.1
我的伺服器主機名稱是CORE
.我的 NetBIOS 網域是CORP
.我的 DNS 網域是internal.corp.com
我沒有想法,任何幫助將不勝感激。
答案1
經過更多搜索,我找到了解決我的問題的方法。正如發布的這裡,我所需要做的就是更改我的 samba 配置:
/etc/samba/smb.conf 我將此行新增到該[global]
部分。
server services = rpc, nbt, wrepl, ldap, cldap, kdc, drepl, winbind, ntp_signd, kcc, dnsupdate, dns, s3fs
答案2
我不確定這是否有幫助,但將 in 設定nameserver
為 /etc/resolv.conf
與 samba ad dc 相同的 IP 非常重要,如下所述:
The 'nameserver' you set in '/etc/resolv.conf' must be an AD DC, otherwise the join will not be able to find the KDC.
https://wiki.samba.org/index.php/Joining_a_Samba_DC_to_an_Existing_Active_Directory#Configuring_DNS