我正在尝试使用 samba-tool 作为域控制器将 ubuntu 服务器 20.04 加入到 Windows 活动目录中,这样在 Windows 服务器出现故障时它将充当备份域控制器。
Windows 服务器运行的是 Windows Server 2019,ForstMode 是 Windows2012Forest,DomainMode 是 Windows2012Domain。
我使用管理员帐户尝试将服务器加入活动目录并使用以下命令
sudo samba-tool domain join DOMAINNAME.LOCAL DC -U"DOMAINNAME\Administrator" --server 192.168.1.200
当我运行命令时,我得到以下信息
Password for [DOMAINNAME\Administrator]: INFO 2020-06-02 06:47:09,596 pid:4570 /usr/lib/python3/dist-packages/samba/join.py #1542: workgroup is DOMAINNAME INFO 2020-06-02 06:47:09,596 pid:4570 /usr/lib/python3/dist-packages/samba/join.py #1545: realm is DOMAINNAME.local Adding CN=SERVER3,OU=Domain Controllers,DC=DOMAINNAME,DC=local Adding CN=SERVER3,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=DOMAINNAME,DC=local Adding CN=NTDS Settings,CN=SERVER3,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=DOMAINNAME,DC=local DsAddEntry failed with status WERR_ACCESS_DENIED info (8567, 'WERR_DS_INCOMPATIBLE_VERSION') Join failed - cleaning up Deleted CN=SERVER3,OU=Domain Controllers,DC=DOMAINNAME,DC=local Deleted CN=SERVER3,CN=Servers,CN=Default-First-Site-Name,CN=Sites,CN=Configuration,DC=DOMAINNAME,DC=local ERROR(runtime): uncaught exception - DsAddEntry failed File "/usr/lib/python3/dist-packages/samba/netcmd/__init__.py", line 186, in _run
return self.run(*args, **kwargs) File "/usr/lib/python3/dist-packages/samba/netcmd/domain.py", line 701, in run
join_DC(logger=logger, server=server, creds=creds, lp=lp, domain=domain, File "/usr/lib/python3/dist-packages/samba/join.py", line 1558, in join_DC
ctx.do_join() File "/usr/lib/python3/dist-packages/samba/join.py", line 1446, in do_join
ctx.join_add_objects() File "/usr/lib/python3/dist-packages/samba/join.py", line 682, in join_add_objects
ctx.join_add_ntdsdsa() File "/usr/lib/python3/dist-packages/samba/join.py", line 607, in join_add_ntdsdsa
ctx.DsAddEntry([rec]) File "/usr/lib/python3/dist-packages/samba/join.py", line 548, in DsAddEntry
raise RuntimeError("DsAddEntry failed")
如何解决这个问题?或者,如果有更好的方法将服务器作为域控制器加入活动目录,这也很有用,谢谢
您无法将 Samba 作为 DC 加入 2019 DC,尚不支持架构版本,您可以作为文件服务器加入。