Skip to Content
Linux Networking Cookbook
book

Linux Networking Cookbook

by Carla Schroder
November 2007
Beginner
642 pages
15h 43m
English
O'Reilly Media, Inc.
Content preview from Linux Networking Cookbook

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:

  1. Make sure you have a reliable Network Time Protocol (NTP) server available to your LAN, and that all hosts are synchronized.

  2. 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.

  3. Stop the Samba and Winbind daemons.

  4. Create a Linux group for machine accounts.

  5. Configure /etc/hosts.

  6. Configure /etc/resolv.conf.

  7. Configure Samba.

  8. Configure NSS.

  9. Configure PAM.

  10. 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

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Linux Networking Cookbook

Linux Networking Cookbook

Gregory Boyce
Linux Security Cookbook

Linux Security Cookbook

Daniel J. Barrett, Richard E. Silverman, Robert G. Byrnes

Publisher Resources

ISBN: 9780596102487Errata Page