The smb.conf parameter security = domain does not really make Samba behave as a domain controller. This setting means we want Samba to be a domain member. See Samba as a PDC for more information.
smb.conf