In current Samba 4.16.1 it's possible to enable optional features with the enableOptionalFeature rootDSE modify operation. Trying disableOptionalFeature as described in https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-adts/8106371b-9d69-413a-8e01-7fd97eca81b1 leads to: LdbError(53, 'rootdse_modify: unknown attribute to change!')