samba-domain icon indicating copy to clipboard operation
samba-domain copied to clipboard

Change DOMAIN_DC to DOMAIN_DN and make it optional

Open SphtKr opened this issue 5 months ago • 2 comments

The DOMAIN_DC env variable was provided in all examples but not documented in the "quick start" instructions, yet it was necessary for setup to run. This change computes the value from DOMAIN if it is not explicitly specified, and adds documentation for it. It also changes the name to DOMAIN_DN as I think this is a more accurate name than DOMAIN_DC, which is ambiguous (it's not necessarily the "root DN", which might technically be "", nor the "search base DN", which is often "OU=Users,DC=corp,...", but it is a DN and it's for the domain...there might be a better name). If DOMAIN_DN is not specified but DOMAIN_DC is, then the value of DOMAIN_DC will be used, for backwards-compatibility with existing documentation/examples/deployments.

I've added documentation for it, but notably I'm not sure what the impact is if something is specified for the DN-style domain that doesn't match the DNS-style domain (e.g. DOMAIN=CORP.EXAMPLE.COM + DOMAIN_DN=DC=DOMAIN,DC=EXAMPLE,DC=COM ... Samba may assume somewhere that these two match (or may not). In any case, the existing code allowed a mismatch, so this new code does not prevent it.

SphtKr avatar Jan 17 '24 11:01 SphtKr