Adding a CentOS 7 host to AD using realmd

lock

A CentOS host can be added to an AD for suthentication using samba-winbind or realmd packages.

In this tutorial we will learn the simple way of using AD aunthentication using realmd packages using the below steps:

Install the required packages:
[root@gw-17 ~]# yum install realmd oddjob oddjob-mkhomedir sssd samba-common-tools -y

Explore the settings of domain, for example “gw.local”
[root@gw-17 ~]# realm discover gw.local

Join the Active Directory, which will also install and configure the required packges sssd, pam, nsswitch.conf, etc. The AD domain administrator’s password will be required.
[root@gw-17 ~]# realm join gw.local

Enable Active Directory login
[root@gw-17 ~]# realm permit –realm gw.local –all

Test
====
Try to SSH to the linux host using a user account for example “user1”. The username should be entered in SSH login prompt as “user1@gw.local” and the AD password for user1