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:
Configure your system with a static IP address and update
/etc/hosts
to point to that IP address rather than localhost.Make sure that your time is kept up to date by installing an NTP client:
sudo apt-get install ntp
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'
Install Samba and
smbclient
:sudo apt-get install samba smbclient
Remove stock
smb.conf
:sudo rm /etc/samba/smb.conf
Provision the domain:
sudo samba-tool domain provision --realm ad.example.org --domain example --use-rfc2307 --option="interfaces=lo eth1" --option="bind interfaces only=yes" --dns-backend BIND9_DLZ
Save the randomly generated admin password.
Symlink...