Table of Contents#
- Prerequisites
- Setting up Network and DNS Configuration on CentOS 7
- Installing Required Packages on CentOS 7
- Configuring Realmd on CentOS 7
- Joining the CentOS 7 Desktop to the Zentyal PDC
- Testing the Domain Join
- Troubleshooting Tips
- Conclusion
- References
Prerequisites#
- A running Zentyal PDC with active directory integration enabled. You should have administrative access to the Zentyal server and know the domain name (e.g., example.com).
- A CentOS 7 desktop machine with internet access to install necessary packages.
- Basic knowledge of Linux command - line operations.
Setting up Network and DNS Configuration on CentOS 7#
- Static IP Configuration
- Edit the network configuration file for the network interface. For example, if your interface is
eth0, you can edit the file/etc/sysconfig/network-scripts/ifcfg-eth0.sudo nano /etc/sysconfig/network-scripts/ifcfg-eth0
- Set the following parameters: ```plaintext TYPE=Ethernet BOOTPROTO=none DEFROUTE=yes PEERDNS=yes PEERROUTES=yes IPV4_FAILURE_FATAL=no IPV6INIT=yes IPV6_AUTOCONF=yes IPV6_DEFROUTE=yes IPV6_PEERDNS=yes IPV6_PEERROUTES=yes IPV6_FAILURE_FATAL=no IPV6_ADDR_GEN_MODE=stable-privacy NAME=eth0 UUID=<your-network-interface-uuid> DEVICE=eth0 ONBOOT=yes IPADDR=<your-static-ip-address> NETMASK=<your-netmask> GATEWAY=<your-gateway-ip> DNS1=<zentyal-dns-ip>- Replace
<your-network-interface-uuid>,<your-static-ip-address>,<your-netmask>,<your-gateway-ip>, and<zentyal-dns-ip>with the appropriate values. - Save and exit the file.
- Restart the network service:
sudo systemctl restart network
- Edit the network configuration file for the network interface. For example, if your interface is
- Verify DNS Resolution
- Use the
nslookupcommand to check if you can resolve the domain name of the Zentyal PDC.nslookup <your-zentyal-domain-name> - If the command returns the correct IP address of the Zentyal server, DNS resolution is working correctly.
- Use the
Installing Required Packages on CentOS 7#
- Enable EPEL Repository
- The Extra Packages for Enterprise Linux (EPEL) repository provides additional packages that are not available in the default CentOS repositories.
sudo yum install epel-release
- The Extra Packages for Enterprise Linux (EPEL) repository provides additional packages that are not available in the default CentOS repositories.
- Install SSSD, Realmd, and Other Dependencies
- SSSD (System Security Services Daemon) is used to manage user authentication and authorization. Realmd simplifies the process of joining a machine to a domain.
sudo yum install sssd realmd samba-common-tools oddjob oddjob-mkhomedir adcli
- SSSD (System Security Services Daemon) is used to manage user authentication and authorization. Realmd simplifies the process of joining a machine to a domain.
Configuring Realmd on CentOS 7#
- Discover the Domain
- Use the
realm discovercommand to find the Zentyal domain.sudo realm discover <your - zentyal - domain - name> - This command should display information about the domain, such as the domain name, domain controllers, and available services.
- Use the
- Edit the Realmd Configuration
- Edit the
/etc/realmd.conffile to configure realm - specific settings.sudo nano /etc/realmd.conf - Add the following lines:
- Edit the
[active-directory] default-client-software = sssd os-name = CentOS Linux os-version = 7
[users] default-home = /home/%D/%U default-shell = /bin/bash
[
- Replace
<your-zentyal-domain-name>with the actual domain name. - Save and exit the file.
Joining the CentOS 7 Desktop to the Zentyal PDC#
- Join the Domain
- Use the
realm joincommand to join the CentOS 7 machine to the Zentyal PDC. You will need to provide the credentials of a domain administrator.sudo realm join -U <domain-administrator-username> <your-zentyal-domain-name> - Enter the password for the domain administrator when prompted.
- If the join is successful, you should see a message indicating that the machine has been joined to the domain.
- Use the
Testing the Domain Join#
- List Domain Users and Groups
- Use the
getent passwdandgetent groupcommands to list domain users and groups.getent passwd getent group - You should see the domain users and groups in the output.
- Use the
- Log in as a Domain User
- Log out of the local user session and try to log in using a domain user account at the graphical login screen or the console.
- If the login is successful, the domain join was completed successfully.
Troubleshooting Tips#
- DNS Issues: If you are unable to discover the domain, double - check your DNS configuration on the CentOS 7 machine. Make sure the DNS server IP is set to the Zentyal server's IP.
- Firewall Issues: Ensure that the necessary ports are open on both the CentOS 7 machine and the Zentyal server. For example, ports 53 (DNS), 88 (Kerberos), 135 (RPC), 139 (NetBIOS), 389 (LDAP), 445 (SMB), and 636 (LDAPS) may be required.
- Authentication Issues: If you are unable to log in as a domain user, check the user's account status in the Zentyal PDC and make sure the password is correct.
Conclusion#
Joining a CentOS 7 desktop to a Zentyal PDC allows for centralized user management and authentication, enhancing the security and manageability of your network. By following the steps outlined in this blog post, you should be able to successfully integrate your CentOS 7 machine into the Zentyal domain infrastructure.
References#
- Zentyal official documentation: https://www.zentyal.com/documentation/
- CentOS official documentation: https://docs.centos.org/
- SSSD official documentation: https://docs.pagure.org/SSSD.sssd/