LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 09-16-2021, 05:42 AM   #1
weenux28
LQ Newbie
 
Registered: Dec 2012
Posts: 5

Rep: Reputation: Disabled
Point Realm Join command to a specific Active Directory Server under a local domain


Not sure if my title is confusing but, just wondering is there a way to point Realm Join command to a specific SRV Active Directory server that is a member ex. of mycompany.local domain?

Here's my join command:

Code:
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 servers under mycompany.local:
Code:
nslookup -type=SRV _ldap._tcp.mycompany.local
;; Truncated, retrying in TCP mode.
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.
Say I want "Realm Join" to specifically use "dc07.mycompany.local."? Maybe an option like:

Code:
--active-directory-server='dc07.mycompany.local.'
Why do I need this? Because we have many subnets and some servers we deploy belongs to a subnet that by default does not have access, say, to "dc01.mycompany.local." Since "realm join" command by default just picks randomly from all the AD servers that is under "mycompany.local", the command will fail, then what we do is we run the command again until it picks the right AD server which is "dc07.mycompany.local."

You can say, just allow the machine to all the AD servers so you won't have a problem. Yeah, actually that's our workaround instead of running the realm join command multiple times. But it will be great if we can specify the AD server immediately on the command line so we don't have to create a Service Request to the Network guys to allow our machine to the other AD server in mycompany.local and wait for them.

Thanks in advance guys!
 
Old 09-16-2021, 04:42 PM   #2
weenux28
LQ Newbie
 
Registered: Dec 2012
Posts: 5

Original Poster
Rep: Reputation: Disabled
Solved my problem. I just explicitly declared the name of the domain controller in replace for 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.
 
  


Reply

Tags
active directory, dns, domain controller



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
join to AD domain; join with domain credential with ssh nnicola82 Linux - Server 0 11-13-2019 11:45 PM
how to join ubnutu system with active directory also login into active directory user mani25288 Linux - Server 2 07-10-2017 09:56 AM
How to prepare Suse 11 server to join the active directory domain? cbc SUSE / openSUSE 1 06-29-2011 07:51 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 11:27 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration