Linux Domain Join server Setup Notes - Oliver-Mustoe/Oliver-Mustoe-Tech-Journal GitHub Wiki

In this page I detail how I installed realmd on a CentOS 7 VM, as well as connecting to my Domain.

Notes

First I installed the realmd package with the command:

  • sudo yum install realmd

Then I did some checks to verify important information with the following commands (with descriptions):

Making sure we are not currently apart of a domain (should come back with no result)

  • realm list

Checking to see if Active Directory server information is on the system (should have information about active directory domain already, if not need to enter the information according to the step 3.1 here)

  • cat /etc/resolv.conf

Making sure that the system can resolve the domain name (should return information about the active directory domain)

  • nslookup firstname.local

After those tests I installed the rest of the packages needed with the following command:

  • sudo yum install oddjob oddjob-mkhomedir sssd adcli openldap-clients policycoreutils-python samba-common samba-common-tools krb5-workstation

Then I joined the domain with the command:

  • realm join --user=[admin username] firstname.local

Then I then gave sssd.conf the appropriate permissions with the following commands in sequence:

  • chown root:root /etc/sssd/sssd.conf
  • chmod 0600 /etc/sssd/sssd.conf
  • restorecon /etc/sssd/sssd.conf
  • authconfig --enablesssd --enablesssdauth --enablemkhomedir --update
  • systemctl start sssd
  • systemctl enable sssd

I also used "systemctl status sssd" to make sure the service was running how it should. I used "realm list" to check that I was part of the domain as well.

I then used the following 2 ways to verify the installation was a success.

1st Way: PuTTY

I logged on to wks01, can be any workstation, and used PuTTY to log into the server (IP - 10.0.5.4). The user I logged in as was [email protected] (in this example [email protected]) and used that users domain password to successfully log into the server. To check everything was working, I used the commands id, whoami, and pwd to get the results below: 1-back

2nd Way: Server

I logged into the mail/web server with a [email protected] account (If doing both methods use a different account from the one above) and used the commands id, whoami, and pwd to get results similiar to above screenshot

SOURCES

https://www.thegeekdiary.com/how-to-connect-to-an-active-directory-domain-using-realmd-configure-centos-rhel-7-as-active-directory-client/ https://www.golinuxcloud.com/add-linux-to-windows-ad-domain-realm/