Linux Domain Join - Galen-Dively/SYS250-02-Journal GitHub Wiki
Tech Log Entry: Joining a Domain in Linux
Overview
This log outlines the steps taken to join a CentOS machine to a Windows Active Directory domain for centralized authentication and resource access.
Prerequisites
Before proceeding, I will become the root user temporarily to execute administrative commands. I will do this by running:
sudo -i
Installing Required Packages
I need to install the necessary packages for joining the domain. I will use the following command:
yum install realmd sssd adcli samba samba-common
Starting and Enabling SSSD
Next, I need to start and enable the System Security Services Daemon (SSSD) to ensure it runs at boot:
systemctl start sssd systemctl enable sssd
Discovering the Domain
I will use the realm
command to discover the Active Directory domain. I replace [YOUR_DOMAIN]
with the actual domain name:
realm discover [YOUR_DOMAIN]
Joining the Domain
I will join the domain using the following command, providing an Active Directory administrator username and password:
realm join --user=[AD_USERNAME] [YOUR_DOMAIN]
Verifying the Domain Join
After successfully joining the domain, I will verify the status with:
realm list
Configuring SSSD
If necessary, I will edit the SSSD configuration file to adjust settings:
nano /etc/sssd/sssd.conf
I will ensure the configuration file has appropriate permissions:
chmod 600 /etc/sssd/sssd.conf
Restarting the SSSD Service
To apply any changes, I will restart the SSSD service:
systemctl restart sssd
Testing Domain User Login
Finally, I will test logging in with an Active Directory user account to confirm the domain join was successful. I will do this by switching users in the terminal:
su - [AD_USERNAME]@[YOUR_DOMAIN]