Create an Active Directory Infrastructure with Samba4 on Ubuntu – Part 1

If You Appreciate What We Do Here On TecMint, You Should Consider:

  1. Stay Connected to: Twitter | Facebook | Google Plus
  2. Subscribe to our email updates: Sign Up Now
  3. Get your own self-hosted blog with a Free Domain at ($3.95/month).
  4. Become a Supporter - Make a contribution via PayPal
  5. Support us by purchasing our premium books in PDF format.
  6. Support us by taking our online Linux courses

We are thankful for your never ending support.

Matei Cezar

I'am a computer addicted guy, a fan of open source and linux based system software, have about 4 years experience with Linux distributions desktop, servers and bash scripting.

Your name can also be listed here. Got a tip? Submit it here to become an TecMint author.

RedHat RHCE and RHCSA Certification Book
Linux Foundation LFCS and LFCE Certification Preparation Guide

You may also like...

27 Responses

  1. Hannes van Vuuren says:

    Thanks a lot for this article! After going through the domain provision process a few times this seems to me the most solid article about the process. There is plenty of outdated information around the net, and Samba wiki is often confusing (if not outright down on a given day).

  2. unknowen says:


    I have reached to the step below and I have encountered one failure! any idea, please?

    $ sudo samba-tool domain provision --use-rfc2307 -interactive

    Usage: samba-tool domain provision [options]

    samba-tool domain provision: error: no such option: -i

  3. Dave says:

    Hi guys.

    After running through the guide in the office, I took the server on site to a client with a different network.

    When changing the IP address and DNS entries the lookup of domain.local returns the IP address the box had in our office.
    Tried flushing the DNS and a bunch of things and nothing has worked so far.

    How would I get around this?

    • Matei Cezar says:

      You must manually update all IP’s addresses on your machine (hosts, network interfaces, samba IP forwarders, resolvers ) and samba DNS records to fit new IP range.

      • Dave says:

        Where do I edit the samba dns records and IP forwarders? In the smb.conf file?

        Where do i edit the resolvers as well. I have set the rest, I have also set the IP’s in the smb.conf file.

  4. Dave says:

    Hi there,

    I have set up an active directory domain controller according to your guide in a test environment in our office.

    When I took it on site to a different IP range, I changed the IP address. Changed the DNS according to the site. When i ping the domain name it returns the old IP address. When I do an NSlookup it also returns the IP address I had set up the machine on in the office.

    I have set it up on Ubuntu 16.10

Got something to say? Join the discussion.

Your email address will not be published. Required fields are marked *

Join Over 300K+ Linux Users
  1. 257,757
  2. 11,967
  3. 39,682

Are you subscribed?