The AD server must be installed as a DNS server for a correct connection to AD. If DHCP is running on your network, as a rule, the administrator has already assigned the correct settings for your server. You can see a list of current DNS in the resolv.conf file:
cat /etc/resolv.conf
The IP of the AD server will appear as a nameserver. Otherwise, you can manually assign the nameserver. When using DHCP, you cannot modify resolv.conf directly, so it will be necessary to follow a few simple steps.
You will then need to edit the /etc/resolvconf/resolv.conf.d/head file. Add the line:
nameserver <server_ip>
and start
sudo systemctl start resolvconf.service
Centos 7
The following lines should be added
to the file `/etc/sysconfig/network-scripts/ifcfg-* Here you need to replace ifcfg-* with the name of your network interface and restart NetworkManager
Check your resolv.conf again to make sure everything is correct
Check that the domain name resolves. Note: under Centos 7, it may be required to install the bind-utils package:
Install the necessary packages
Ubuntu 18.04
Centos 7
You must confirm the domain during the installation of kerberos, and specify the server name. Let's check that our domain is visible on the network:
Join the machine to a domain:
If there is no error, everything went fine. You can go to the domain controller and check if our linux server appears in the domain. If the Active Directory server uses self-signed certificates, you need to edit the ldap.conf file. In ubuntu it is stored in /etc/ldap/ldap.conf, in Centos - /etc/openldap/ldap.conf. You should specify (add at the end of the file) this parameter:
Installation check
For example, to get all users (you have to enter a password):
In case we have the ipi.example.com domain and an administrator named "administrator", the command would look like this:
In case of an error, you can add the -d1 key and read the description of the error.