Connecting to an Active Directory server from RedHat

Connecting to an Active Directory server from RedHat


  1. We will be using the FQDN as the example, please note that Active Directory on your Windows Server needs to be created first
  2. 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

  • To verify that that it completed properly, you can run the following command:

realm discover [below is the necessary output]

type: Kerberos

realm-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-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