2

Is there a way to point the Realm Join command to a specific SRV Active Directory domain controller for mycompany.local domain?

Here is the command:

realm join --user='MyAdminUser' --password='p@ssw0rd' --computer-ou='OU=Linux,OU=Servers,OU=MyCompany' --os-name='Linux' --os-version='CentOS 7' mycompany.local

List of my Active Directory domain controllers under mycompany.local:

nslookup -type=SRV _ldap._tcp.mycompany.local

Server: 10.17.145.13 Address: 10.18.145.13#53

_ldap._tcp.mycompany.local service = 0 100 389 dc01.mycompany.local. _ldap._tcp.mycompany.local service = 0 100 389 dc02.mycompany.local. _ldap._tcp.mycompany.local service = 0 100 389 dc03.mycompany.local. _ldap._tcp.mycompany.local service = 0 100 389 dc04.mycompany.local. _ldap._tcp.mycompany.local service = 0 100 389 dc05.mycompany.local. _ldap._tcp.mycompany.local service = 0 100 389 dc06.mycompany.local. _ldap._tcp.mycompany.local service = 0 100 389 dc07.mycompany.local.

Can I "Realm Join" using "dc07.mycompany.local."? Maybe an option like:

--active-directory-server='dc07.mycompany.local.'

We need this because some domain controllers are not available to all networks. For example, some networks do not have access to "dc01.mycompany.local."

Since "realm join" uses the first available domain controller from the returned query for the top level domain "mycompany.local", the command will intermittently fail.

We currently do not use DNS Mnemonics to influence registration of records for sites.

Greg Askew
  • 39,132

2 Answers2

0

On CentOS 7, man realm does not indicate that you can chose your domain controller. Similar to my experience, you probably need to revert to a command with such an option:

  • net ads join --server
  • adcli --domain-controller
bgStack15
  • 1,221
0

Solved my problem. I just explicitly declared the name of the domain controller in replace with the local domain name.

realm join --user='MyAdminUser' --password='p@ssw0rd' --computer-ou='OU=Linux,OU=Servers,OU=MyCompany' --os-name='Linux' --os-version='CentOS 7' dc02.mycompany.local.

With this, realm will use adcli instead of net utililty.