Connecting Linux server to Active Directory
Hideez Enterprise Server – Connecting Linux Server to Active Directory
This guide outlines the steps to connect a Linux server to an Active Directory (AD) domain. The process varies slightly between Ubuntu and CentOS distributions.
1. Edit /etc/hosts File
Edit the /etc/hosts
file to add or update the Fully Qualified Domain Name (FQDN) for the host:
You may also need to add the FQDN for the AD server:
Ensure the AD server is installed as a DNS server for proper connectivity. Check the current DNS settings with:
2. Configure DNS Settings
Ubuntu 18.04
Install resolvconf package:
Edit the
/etc/resolvconf/resolv.conf.d/head
file to add the line:Start the resolvconf service:
CentOS 7
Add the following lines to the network interface configuration (replace
ifcfg-*
with your actual network interface):Restart the NetworkManager:
Check
/etc/resolv.conf
again:(Optional) Install bind-utils:
Verify domain resolution:
3. Install Necessary Packages
Ubuntu 18.04
CentOS 7
During the installation of Kerberos, confirm the domain and specify the server name.
4. Discover the Domain
Check if the domain is visible on the network:
5. Join the Domain
To join the machine to the domain, use:
If there are no errors, the server should now appear in the domain controller.
6. Update ldap.conf for Self-Signed Certificates
If the Active Directory server uses self-signed certificates, edit the ldap.conf
file:
Ubuntu:
/etc/ldap/ldap.conf
CentOS:
/etc/openldap/ldap.conf
Add the following parameter at the end of the file:
7. Installation Check
To retrieve all users, execute the following command (you will need to enter a password):
For example, if your domain is hideez.example.com
and your administrator is named "administrator", the command would look like this:
8. Troubleshooting
If you encounter an error, add the -d1
option to the command to get detailed error information.
By following these steps, you should successfully connect your Linux server to an Active Directory environment.
Last updated