Table of Contents#
- Prerequisites
- Configure Zentyal PDC for Domain Integration
- Prepare Ubuntu 14.04 Client
- Install Required Packages on Ubuntu
- Join Ubuntu to Zentyal Domain
- Verify Domain Integration
- Troubleshooting Common Issues
- Conclusion
- 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.,
administratorfor joining, or a dedicated service account).
- Domain name (e.g.,
- 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):
-
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.,
administratoror a service account) exist (Menu → Domain → Users).
- Domain name (e.g.,
-
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 -y3.2 Set Hostname (Optional, Recommended)#
Set a hostname matching the domain (e.g., ubuntu-client.example.local):
sudo hostnamectl set-hostname ubuntu-client.example.localEdit /etc/hosts to include the hostname:
sudo nano /etc/hostsAdd:
<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/baseAdd:
nameserver <Zentyal-IP>
search example.local # Match your Zentyal domain
Update DNS settings:
sudo resolvconf -uVerify DNS resolution (ping the Zentyal domain):
ping example.local # Should resolve to Zentyal’s IP4. 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 -yThese 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.confReplace/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 restart5.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 restart6. 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 groupOutput 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 - jdoeCheck the user’s ID and home directory:
id jdoe
ls -la /home/EXAMPLE/jdoe # Home directory should be created7. Troubleshooting Common Issues#
7.1 DNS Resolution Failures#
- Verify
/etc/resolv.confpoints to Zentyal’s IP. - Ensure Zentyal’s DNS includes domain records (check Zentyal web interface → Network → DNS).
7.2 Domain Join Fails#
- Check
smb.conffor 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.winbinddand/var/log/samba/log.smbd. - Ensure
winbindis properly configured insmb.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#
- Zentyal Documentation
- Ubuntu Samba/Active Directory Guide
- Samba Official Documentation
- Samba Winbind Guide
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.