Connecting Linux server to Active Directory
IPI Enterprise Server – Connecting Linux Server to Active Directory
1. Edit /etc/hosts File
Edit the /etc/hosts file to add or update the Fully Qualified Domain Name (FQDN) for the host:
bashCopy code127.0.1.1 <hostname>.<Domain_Name> <hostname>You may also need to add the FQDN for the AD server:
bashCopy code<server_ip> <Server_Name>.<Domain_Name> <Server_Name>Ensure the AD server is installed as a DNS server for proper connectivity. Check the current DNS settings with:
bashCopy codecat /etc/resolv.conf2. Configure DNS Settings
Ubuntu 18.04
Install resolvconf package:
bashCopy codesudo apt update sudo apt install resolvconf sudo systemctl enable resolvconf.serviceEdit the
/etc/resolvconf/resolv.conf.d/headfile to add the line:bashCopy codenameserver <server_ip>Start the resolvconf service:
bashCopy codesudo systemctl start 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.confagain:(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.confCentOS:
/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 ipi.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.
Last updated