Windows server 2022 joined to Samba AD 4.20

I joined Windows Server 2022 to Samba 4.20. For those who are familiar with Samba based Active Directory, you might be a little surprised. Historically this would of not been possible as Samba AD is only at a 2008 functional level. However, starting with Samba 4.19 there is a new smb.conf option called ad dc functional level. I set this to 2012_R2 as Samba mostly meets that 2012_R2 functional level anyway. After I did this I was able to join a Windows Server 2022. (I had to increase the domain and forest functional level with samba-tool)

When you join the server, make sure you do the additional setup. Here is some documentation Adding a Windows AD to your Samba Active Directory domain — Samba-AD 4.19 documentation

I am going to assume that you already setup DNS and joined the controller to the domain. After you have joined it you need to force enable the sysvol. Run this Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\Netlogon\Parameters" -Name "SysvolReady" -Value "1". Next, force activate the time sync. This is the most important step so do not skip this. Run Set-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Services\W32Time\Parameters" -Name "Type" -Value "NTP"

After that setup the replication with the Robocopy workaround.

https://wiki.samba.org/index.php/Robocopy_based_SysVol_replication_workaround

I also find it cool that Samba 4.20 has early support for the 2016 functional level. It isn’t finished and probably is still buggy but I find it cool none the less.