试图运行 samba AD DC 但我被卡住了。创建域配置后,我定义了 resolv.conf:
cat /etc/resolv.conf
nameserver 10.99.0.30
search example.com
服务运行:
samba-ad-dc.service - Samba Active Directory Domain Controller
Loaded: loaded (/etc/systemd/system/samba-ad-dc.service; enabled; vendor preset: disabled)
Active: active (running)
DNS记录的查询似乎很好:
$ host -t SRV _ldap._tcp.example.com.
_ldap._tcp.random.example.com has SRV record 0 100 389 random.example.com.
$ host -t SRV _kerberos._udp.example.com.
_kerberos._udp.random.example.com has SRV record 0 100 88 random.example.com.
$ host -t A random.example.com.
dc1.random.example.com has address 10.99.0.30
当我做netstat时:
netstat -tulpn | grep ":53"
tcp 0 0 0.0.0.0:53 0.0.0.0:* LISTEN 34599/samba: task[d
tcp6 0 0 :::53 :::* LISTEN 34599/samba: task[d
udp 0 0 0.0.0.0:53 0.0.0.0:* 34599/samba: task[d
udp 0 0 0.0.0.0:5353 0.0.0.0:* 745/avahi-daemon: r
udp6 0 0 :::53 :::* 34599/samba: task[d
udp6 0 0 :::5353 :::* 745/avahi-daemon: r
应该是 netstat 中 DNS(local) 10.99.0.30 的确切 IP 地址中的本地地址,例如 10.99.0.30:53 吗?
当我尝试从 WINDOWS 主机加入 AD 时,我得到了:
- The query was for the SRV record for _ldap._tcp.dc._msdcs.example.com
- The following domain controllers were identified by the query:
(no Active Directory Domain Controllers found)
- Host (A) or (AAAA) records that map the names of the domain controllers to
their IP addresses are missing or contain incorrect addresses.
- Domain controllers registered in DNS are not connected to the network or are not running.
我什至无法通过 ping 解析 example.com。
Netstat 本地地址很好,即使使用 0.0.0.0:53 也可以解析(监听该服务器上的任何 IPv4 地址)源
我通过根据此页面“配置防火墙”部分配置防火墙解决了问题。您必须将 samba-dc 服务添加到您的区域。您可以列出要打开的端口,然后将它们持久化:
重新加载防火墙:
验证(查找 samba-dc):
PS:我认为这将是防火墙的问题,但在samba 安装说明中与防火墙配置无关。