Samba4 as Primary Domain Controller
Written by Adrien le Maire - 25 march 2011

It is a service available under GNU/Linux. Originally build for sharing files with windows using a smb-compatible protocol.
The version 4 implements a lot of new fetaures :
- support of the 'Active Directory' logon and administration protocols
- new 'full coverage' testsuites
- full NTFS semantics for sharing backends
- Internal LDAP server, with AD semantics
- Internal Kerberos server, including PAC support
- Bind9 integration for AD DNS support
- fully asynchronous internals
- flexible process models
- better scalablilty from micro to very large installations
- new RPC infrastructure (PIDL)
- flexible database architecture (LDB)
- Python support - used excessively for client and management tools
- generic security subsystem (GENSEC)
- over 50% auto-generated code!
For those who want to use the Ubuntu version, pass directly to the point 3.
- Add two repositories
- Set the packages from ppa repositories prioritirly You need to create the file /etc/apt/preferences.d/ppa with the following content :
- Install the right pakages
- To configure and install your domain Check your hosts file to match with the hostname. Remove the configuration file " /etc/samba/smb.conf" Adapt the following command line to your case.
$ apt-add-repository ppa:samba-team/ppa $ apt-add-repository ppa:openchange/dailyif you don't have the command apt-add-repo ; install it :
sudo apt-get install python-software-properties
Package: * Pin: origin ppa.launchpad.net Pin-Priority: 600
aptitude update && aptitude install samba4 openchangeserver samba4-ldb libwbclient0If you get an error during the process ; you may need to create a link : # ln -s /usr/lib/libwbclient.so.0 /usr/lib/libwbclient.so then run "dpkg --configure -a"
bash /usr/share/samba/setup/provision --realm=pdc.mydomain --domain=MYDOMAIN --adminpass=password --server-role='domain controller'add /var/lib/samba/private/named.conf to /etc/bind/named.conf
Classified in : Linux, Network Services - Tags : Samba, PDC, Domain controller, Ubuntu