AD Authentication in Linux

Recently I was working on a project to add linux machines ( Clients ) to a Windows Active Directory Server. When I started, I saw many blog post for that, some of them were not working & some were working to some extent. I tried a combination of them & succeeded in connecting a Linux client to Windows Domain ( AD ).

Following are the steps I followed which got the Linux Client into Windows domain:-

Before we start, we needed some basic info about the environment:-

Required

# Active Directory Server with
the users & groups already setup
# KDC server name (FQDN)
# Credentials of a User(administrator) who can join a client machine to AD

IMPORTANT:

Make
sure the AD & your linux client have time sync. Means any noticeable time
difference may cause login delays

# host
-t srv _kerberos._tcp.<DOMAIN>
(Allows a client to locate a domain controller that is running the KerberosKDC service for the domain)

5

Make
sure "hostname -f" returns answer

On your Linux box, set the fully-qualified
hostname in /etc/sysconfig/network and /etc/hosts. Note that the first part
of your hostname must be no longer than 15 characters and unique in the
domain
# /etc/sysconfig/network
HOSTNAME=myhostname.example.com
# /etc/hosts
127.0.0.1
myhostname.example.com
myhostname
localhost.localdomain localhost
# `hostname -f` should returns answer

6

Configure
DNS Client ( this step is optional as long as the server names are resolving
properly)