11.6. Joining Linux to an Active Directory Domain
Problem
You are running a Windows network managed by an Active Directory domain. You know you can stick Linux hosts on the network and make them accessible to Windows hosts, but what you really want is for the Linux boxes to be full members of your Active Directory domain. This allows you to manage them just like any other AD object, have a unified login for all hosts, and manage Linux users from Active Directory. Your DNS house is in order, and you already have a Kerberos Key Distribution Center (KDC).
Solution
You need all Samba, Winbind, and the Kerberos client packages installed, and support for Kerberos, LDAP, Active Directory, and Winbind compiled into Samba. Please see Recipe 11.1 to learn exactly what you need.
Also needed are accounts for the Linux users and computers already present in Active Directory.
These are the steps to follow:
Make sure you have a reliable Network Time Protocol (NTP) server available to your LAN, and that all hosts are synchronized.
Delete all .tdb files to get rid of stale data: /etc/samba/secrets.tdb (which may not exist) and in /var/lib/samba. Keep backup copies, though you probably won't need them.
Stop the Samba and Winbind daemons.
Create a Linux group for machine accounts.
Configure /etc/hosts.
Configure /etc/resolv.conf.
Configure Samba.
Configure NSS.
Configure PAM.
Restart all daemons and test.
When the first two steps are accomplished, stop the Samba and Winbind daemons. On Fedora:
# /etc/init.d/smb stop ...Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access