dotlinux blog

Integrate Ubuntu 14.04 (Trusty Tahr) to Zentyal PDC (Primary Domain Controller)

Integrating Ubuntu 14.04 (Trusty Tahr) with a Zentyal Primary Domain Controller (PDC) allows you to centralize user authentication, file sharing, and policy management—similar to how Windows clients join an Active Directory domain. Zentyal is a Linux-based server solution that provides Active Directory–like functionality (e.g., user/group management, DNS, DHCP) using Samba. This guide walks you through the process of joining an Ubuntu 14.04 client to a Zentyal PDC, enabling domain users to log in, access shared resources, and leverage Zentyal’s centralized management.

2026-05

Table of Contents#

  1. Prerequisites
  2. Configure Zentyal PDC for Domain Integration
  3. Prepare Ubuntu 14.04 Client
  4. Install Required Packages on Ubuntu
  5. Join Ubuntu to Zentyal Domain
  6. Verify Domain Integration
  7. Troubleshooting Common Issues
  8. Conclusion
  9. References

1. Prerequisites#

Before starting, ensure:

  • A Zentyal server is fully configured as a PDC (Domain Controller) with:
    • Domain name (e.g., example.local), NetBIOS name (e.g., EXAMPLE), and DNS service.
    • At least one domain user (e.g., administrator for joining, or a dedicated service account).
  • An Ubuntu 14.04 (Trusty Tahr) machine with:
    • Network connectivity to the Zentyal server.
    • Static or DHCP-assigned IP (with DNS pointing to Zentyal’s IP).
    • Administrative (sudo) access.

2. Configure Zentyal PDC for Domain Integration#

Log in to the Zentyal web interface (default: https://<zentyal-ip>:8443):

  1. Domain Services: Ensure Zentyal is configured as a PDC (Menu → Domain → General). Verify:

    • Domain name (e.g., example.local), NetBIOS name (e.g., EXAMPLE).
    • User accounts (e.g., administrator or a service account) exist (Menu → Domain → Users).
  2. DNS Configuration: Zentyal’s DNS (Menu → Network → DNS) must resolve the domain. For Ubuntu, set Zentyal’s IP as the primary DNS (explained in Prepare Ubuntu 14.04 Client).

3. Prepare Ubuntu 14.04 Client#

3.1 Update System#

Update packages to ensure compatibility:

sudo apt-get update && sudo apt-get upgrade -y

Set a hostname matching the domain (e.g., ubuntu-client.example.local):

sudo hostnamectl set-hostname ubuntu-client.example.local

Edit /etc/hosts to include the hostname:

sudo nano /etc/hosts

Add:

<Zentyal-IP>   ubuntu-client.example.local   ubuntu-client

3.3 Configure DNS#

Ubuntu 14.04 uses resolvconf to manage DNS. Edit /etc/resolvconf/resolv.conf.d/base:

sudo nano /etc/resolvconf/resolv.conf.d/base

Add:

nameserver <Zentyal-IP>
search example.local  # Match your Zentyal domain

Update DNS settings:

sudo resolvconf -u

Verify DNS resolution (ping the Zentyal domain):

ping example.local  # Should resolve to Zentyal’s IP

4. Install Required Packages on Ubuntu#

Install Samba, Winbind, and NSS/PAM modules for domain integration:

sudo apt-get install samba winbind libnss-winbind libpam-winbind -y

These packages enable:

  • samba: File/print sharing and domain integration.
  • winbind: Bridge between Linux and Windows domains (user/group synchronization).
  • libnss-winbind/libpam-winbind: Name Service Switch (NSS) and PAM integration for domain users.

5. Join Ubuntu to Zentyal Domain#

5.1 Configure Samba (smb.conf)#

Edit Samba’s main configuration file:

sudo nano /etc/samba/smb.conf

Replace/append the following (adjust EXAMPLE.LOCAL and EXAMPLE to match your Zentyal domain/realm):

[global]
   workgroup = EXAMPLE          # NetBIOS name of Zentyal domain
   security = ads               # Active Directory–style security
   realm = EXAMPLE.LOCAL        # Zentyal domain (uppercase)
   password server = <Zentyal-IP>  # Zentyal server IP/hostname
   idmap config * : backend = tdb
   idmap config * : range = 10000-20000
   idmap config EXAMPLE : backend = rid
   idmap config EXAMPLE : range = 20001-30000
   winbind use default domain = yes
   winbind offline logon = false
   template shell = /bin/bash    # Shell for domain users
   template homedir = /home/%D/%U  # Home directory (e.g., /home/EXAMPLE/jdoe)
   winbind nss info = rfc2307    # Use RFC2307 for user/group info (Zentyal compatibility)

5.2 Restart Samba Services#

Restart Samba daemons to apply changes:

sudo service smbd restart
sudo service nmbd restart

5.3 Join the Domain#

Use net ads join with a Zentyal domain administrator account (e.g., administrator):

sudo net ads join -U administrator%<admin-password>

If successful, you’ll see:

Joined 'UBUNTU-CLIENT' to realm 'EXAMPLE.LOCAL'

5.4 Restart Winbind#

Restart Winbind to sync domain users/groups:

sudo service winbind restart

6. Verify Domain Integration#

6.1 List Domain Users/Groups#

Use wbinfo to test Winbind:

  • List domain users:
    wbinfo -u
  • List domain groups:
    wbinfo -g

6.2 Check Name Service Switch (NSS)#

Ensure /etc/nsswitch.conf includes winbind for passwd and group:

cat /etc/nsswitch.conf | grep passwd
cat /etc/nsswitch.conf | grep group

Output should include winbind:

passwd:         compat winbind
group:          compat winbind

6.3 Test Domain User Login#

Switch to a domain user (e.g., jdoe):

sudo su - jdoe

Check the user’s ID and home directory:

id jdoe
ls -la /home/EXAMPLE/jdoe  # Home directory should be created

7. Troubleshooting Common Issues#

7.1 DNS Resolution Failures#

  • Verify /etc/resolv.conf points to Zentyal’s IP.
  • Ensure Zentyal’s DNS includes domain records (check Zentyal web interface → Network → DNS).

7.2 Domain Join Fails#

  • Check smb.conf for typos (realm, workgroup, password server).
  • Verify time synchronization (NTP): Ensure Zentyal and Ubuntu use the same time (run sudo ntpdate <NTP-server> or enable NTP).

7.3 Winbind Fails to Start#

  • Check Samba logs: /var/log/samba/log.winbindd and /var/log/samba/log.smbd.
  • Ensure winbind is properly configured in smb.conf.

8. Conclusion#

Integrating Ubuntu 14.04 with a Zentyal PDC centralizes user management, enabling domain users to log in, access shared resources, and enforce policies. By following these steps—configuring DNS, installing Samba/Winbind, and joining the domain—you can seamlessly bridge Linux and Windows-style domain management.

9. References#

This guide provides a structured approach to integrating Ubuntu 14.04 with Zentyal PDC. Adjust configurations to match your environment, and leverage logs/troubleshooting steps for any issues.