domain_from_dn
Use the `domain_from_dn`` command takes a distinguished name (DN) that contains a domain and returns the domain name in dotted form (acme.com, for example). This conversion doesn’t require lookup in Active Directory. The command performs a simple text conversion.
Zone Type
Not applicable
Syntax
domain_from_dn dn
Abbreviation
dfdn
Options
This command takes no options.
Arguments
This command takes the following argument:
| Argument | Type | Description |
|---|---|---|
| dn | string | Required. Specifies a distinguished name that contains a domain. |
Return Value
This command returns a domain name in dotted form such as acme.com. If the distinguished name doesn’t contain domain component (DC) values, the command returns a notice that the DC values are missing.
Examples
dfdn cn=johndoe,cn=users,dc=acme,dc=com
This example returns: acme.com
Related Commands
The following command converts information from one format to another:
dn_from_domainconverts a domain’s dotted name to a distinguished name.