Setting up Zentyal AD and Samba Shares: 2026 step-by-step guide | INTROSERV

Zentyal: The ultimate guide to Active Directory and Samba File Server setup

Zentyal is a powerful Linux-based alternative to Windows Server, allowing you to deploy a full-featured Domain Controller within your virtual infrastructure (e.g., using Proxmox VE as your hypervisor). This guide covers the journey from a "vanilla" installation to a production-ready domain with network shares and connected Windows clients.

System Preparation

Before you start clicking buttons, ensure the following:

  1. The server has a Static IP address.
  2. You have chosen a Domain Name (e.g., office.lan).
  3. Zentyal is installed with the following modules: DNS, Domain Controller and File Sharing, and Users and Computers.

Info

This tutorial uses Zentyal 8.0. The interface may vary in other versions.

Tip

If you are using the Zentyal ISO installer, select the "Domain Controller" role. The system will automatically mark all three required modules for installation.

Access the web interface at https://<YOUR_ZENTYAL_IP>:8443, enter your credentials, and begin the setup.

Tip

If this is your first login post-installation, select the Domain Controller server role and wait for the components to install. You can skip the initial wizard and perform configurations manually for better control.

Configuring the Domain Name

Navigate to System -> General and specify your Domain Name (e.g., office.lan). Crucial: Click Change, then click Save Changes at the top right to apply the settings.

DNS Module Configuration

Active Directory is critically dependent on DNS. If DNS is misconfigured, Windows clients simply won't "see" your domain.

Step 1: Go to Module Status. Ensure the DNS module is enabled. If not, toggle it on and save changes.

Step 2: Navigate to Infrastructure -> DNS.

Forwarders Tab: Add external DNS servers (e.g., 8.8.8.8 or your ISP's DNS). These handle requests that cannot be resolved locally. Click Add New -> Save Changes.

Domains Tab: This should already contain an entry for your domain (office.lan).

Active Directory Controller Setup

Now, let's transform the server into a functional Domain Controller.

Step 1: In Module Status, enable Domain Controller and File Sharing. If you encounter an error, go to the link:

and ensure your server's IP is correctly assigned:

Step 2: Navigate to the Domain tab.

Step 3: Verify the parameters: Server Role: Domain Controller. NetBIOS name: OFFICE. Domain Realm: office.lan. Drive Letter: This defines which letter will be assigned to the network drive automatically mounted for every domain user upon login.

Creating Domain Users and Groups

A domain is just a shell until it has users.

Step 1: In the sidebar, go to Users and Computers -> Manage.

Step 2: Select Users from the left-hand tree.

Step 3: Click Add New (+).

Step 4: Create a user (e.g., admin.work or i.user) and set a strong password. Click Add.

Tip

Use the same section to create Groups. Organising users into groups (e.g., "HR", "IT", "Sales") is the most efficient way to manage access permissions.

Updating the Domain Administrator

By default, Zentyal creates an Administrator user belonging to the Domain Admins and Schema Admins groups.

Set a secure password for this account immediately. You will need it to join servers to the domain and perform high-level administrative tasks.

Tip

You can create a new domain administrator by adding a user to the Domain Admins and Schema Admins groups.

Configuring Samba Network Shares

To allow file sharing, we need to create a directory with specific Access Control Lists (ACLs).

Step 1: Ensure the File Sharing module is active in Module Status.

Step 2: Go to File Sharing -> Shares.

Step 3: Click Add New, name the folder (e.g., Shared_Files), and select the path: Directory under Zentyal /home/samba.

Step 4: Set Permissions (ACL): In the share list, click the Access Control icon.

Step 5: Click Add New, select your user (or the Domain Users group), and set the permissions to Read Write.

Info

Always click Save Changes in the top header to commit your configuration to the live system.

Joining Linux Workstations (Ubuntu/Debian)

This section covers how to join an Ubuntu or Debian machine to your new domain so users can log in with their domain credentials.

Preparation and Installation

Ensure your Linux client's DNS is pointing to the Zentyal server IP. Then, install the required packages:

sudo apt update && sudo apt install realmd sssd sssd-tools adcli libpam-sss -y

Modify the DNS settings within your network adapter properties. In our example, we are using Ubuntu Desktop. Generally, any desktop environment will provide a way to configure this parameter. Alternatively, you can always perform this via the command line – the specific method will depend on your distribution: Netplan for Ubuntu or the traditional /etc/network/interfaces file for Debian.

Tip

In Linux, it is best to keep only your Domain Controller's IP in your DNS settings. Zentyal’s DNS Forwarders will handle global internet name resolution for the client.

Joining the Domain

Run the following command (replace office.lan with your domain):

sudo realm join -U Administrator office.lan

Enter the Domain Administrator password when prompted.

Configuring Sudo Rights

To allow the "Domain Admins" group to use sudo, create a configuration file:

echo "%Domain\ Admins@office.lan ALL=(ALL) NOPASSWD:ALL" | sudo tee /etc/sudoers.d/domain-admins

Automatic Home Directory Creation

To ensure a /home/user folder is created automatically upon the first domain login:

sudo pam-auth-update --enable mkhomedir

Login Verification

Pay close attention to the username format, as it differs from the standard format typically used on Windows.

Joining a Windows Server/Client to the Domain

Finally, let's connect a Windows machine to verify the setup.

Windows Network Setup

Open Network and Internet -> Network connections.

  • Right-click your adapter -> Properties.
  • Select Internet Protocol Version 4 (TCP/IPv4) -> Properties.


In the Preferred DNS server field, enter the IP address of your Zentyal server. This is the most critical step.

Joining the Domain

Step 1. Open System Properties (System -> Advanced system settings); Computer name tab -> Change button.

Step 2. Select the "Member of Domain" field and enter your domain name. In our example, this is office.lan.

Step 3. In the window that appears, enter the login and password of a user from the domain administrators group. Earlier in this manual, we set the password for the Administrator account, which is a member of the domain administrators group.

After successfully joining the domain, restart Windows. After the reboot, you will be able to use a domain account to log in to Windows.

Login and Verification

At the login screen, select Other user and enter the credentials in this format: OFFICE\i.user (Replace i.user with the username you created).

Once logged in, open My Computer. You should see a mapped network drive (usually H:). This is the Samba share you created in the Zentyal interface.

Congratulations! You have deployed a full-scale IT infrastructure. Zentyal is now successfully managing your DNS, Active Directory (AD), and Samba File Services.

VAT

  • Other

    Other

    0%
  • austria

    Austria

    20%
  • Belgium

    Belgium

    21%
  • Bulgaria

    Bulgaria

    20%
  • Croatia

    Croatia

    25%
  • Cyprus

    Cyprus

    19%
  • Czech Republic

    Czech Republic

    21%
  • Denmark

    Denmark

    25%
  • Estonia

    Estonia

    22%
  • France

    France

    20%
  • Finland

    Finland

    24%
  • Germany

    Germany

    19%
  • Greece

    Greece

    24%
  • Hungary

    Hungary

    27%
  • Ireland

    Ireland

    23%
  • Italy

    Italy

    22%
  • Latvia

    Latvia

    21%
  • Lithuania

    Lithuania

    21%
  • Luxembourg

    Luxembourg

    17%
  • Malta

    Malta

    18%
  • Netherlands

    Netherlands

    21%
  • Poland

    Poland

    23%
  • Portugal

    Portugal

    23%
  • Romania

    Romania

    19%
  • Slovakia

    Slovakia

    20%
  • Slovenia

    Slovenia

    %
  • Spain

    Spain

    21%
  • Sweden

    Sweden

    25%
  • USA

    USA

    0%
european
states
  • Other
  • canada
  • poland
  • european-union
  • france
  • germany
  • austria
  • austria
  • austria
  • austria
  • austria
  • austria
  • austria
  • austria
  • austria
  • austria
  • austria
  • austria
  • austria
  • austria
  • austria
  • austria
  • austria
  • austria
  • austria
  • austria
  • austria
  • austria
  • austria
  • austria
  • austria
  • austria
  • austria
  • austria
  • austria
  • austria