In this video we learn how to setup a primary domain controller (PDC) on Ubuntu using Samba that you can use as a central Active Directory server for Windows clients.
The host is using Ubuntu 10.04 and Samba 3.5.6, but the steps are essentially the same in Ubuntu 13.04 and Samba 4.
[Via Youtube]