can't join ubuntu server 20.04 to active directory with samba-tool as dc

I'm trying to join a ubuntu server 20.04 to a Windows active directory with samba-tool as a domain controller, that way it will act as the backup domain controller in case of failure of the windows server.

The Windows server is running Windows Server 2019 and the ForstMode is Windows2012Forest and the DomainMode is Windows2012Domain.

I used the administrator account to try to join the server to the active directory and used the following command

sudo samba-tool domain join DOMAINNAME.LOCAL DC -U"DOMAINNAME\Administrator" --server 192.168.1.200

When I run the command I get the following

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")

How to fix this issue? Or if there if a better way to join the server to the active directory as a domain controller that would be useful as well, thanks

1 Answer

You cannot join Samba as a DC to a 2019 DC, the schema version is not yet supported, you can join as fileserver.

2

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like