Configuring Samba as an Active Directory compatible directory service

As of Samba 4.0, Samba has the ability to act as a primary domain controller (PDC) in a manner that is compatible with Active Directory.

How to do it…

Installing on Ubuntu 14.04:

  1. Configure your system with a static IP address and update /etc/hosts to point to that IP address rather than localhost.
  2. Make sure that your time is kept up to date by installing an NTP client:
    sudo apt-get install ntp
    
  3. Pre-emptively disable smbd/nmbd from running automatically:
    sudo bash -c 'echo "manual" > /etc/init/nmbd.override'
    sudo bash –c 'echo "manual" > /etc/init/smbd.override'
    
  4. Install Samba and smbclient:
    sudo apt-get install samba smbclient
    
  5. Remove stock smb.conf:
    sudo rm /etc/samba/smb.conf
    

Get Linux Networking Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.