Change DOMAIN_DC to DOMAIN_DN and make it optional #55
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 fromDOMAIN
if it is not explicitly specified, and adds documentation for it. It also changes the name toDOMAIN_DN
as I think this is a more accurate name thanDOMAIN_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). IfDOMAIN_DN
is not specified butDOMAIN_DC
is, then the value ofDOMAIN_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.