Connecting to an Active Directory server from RedHat
- We will be using the FQDN ad.hostway.com as the example, please note that Active Directory on your Windows Server needs to be created first
- You first need to install the necessary packages on the RedHat Server:
Yum –y install realmd oddjob oddjob-mkhomedir ssd adcli samba-common
- To join the domain, run the below command:
realmd join ad.hostway.com
- To verify that that it completed properly, you can run the following command:
realm discover ad.hostway.com [below is the necessary output]
ad.hostway.com
type: Kerberos
realm-name: AD.HOSTWAY.COM
domain-name: ad.hostway.com
configured: Kerberos-member
server-software: active-directory
client-software: sshd
required-package: oddjob
required-package: oddjob-mkhomedir
required-package: sssd
required-package: adcli
required-package: samba-common
login-formats: %U@ad.hostway.com
login-policy: allow-realm-logins
- You will need to edit the /etc/ssh/sshd_config file with the below parameters to ensure that you can SSH to a RHEL with existing AD credentials
#Kerberos options
KerberosAuthentication yes
KerberosOrLocalPasswd yes
KerberosTicketCleanup yes
KerberosGetAFSToken yes
KerberosUseKuserok yes
#GSSAPI options
GSSAPIAuthentication yes