In this documentation, it is assumed:
- That the main domain controller is called srvads1.
- That the secondary domain controller is called srvads2.
- That the domain is called mydomain.lan.
In the instructions below, you will replace mydomain.lan with your own domain name and srvads1 and srvads2 with the machine names of your choice.
Preparing the Virtual machine
1. For the file /etc/hosts, modify it so that it contains the DNS resolution of the machine’s FQDN on its IP (i.e. not the localohst 127.0.0.1 line), specifying the long name then the short name:
2. Define an apt repository and add our GPG public key:
Installing the packages
Configuring Kerberos
1. Open /etc/krb5.conf, remove its contents and add:
Attention !!!
It is necessary to respect the CAPITAL LETTERS and replace the 2 IPs by:
- The IP of your srvrodc first, we can use localhost 127.0.0.1.
- The IP of srvads as the second IP (ex 192.168.1.12).
2. Reboot the host:
3. After rebooting, ensure that kerberos is properly configured and that you get a TGT:
Configuring Samba as a Secondary Domain Controller
1. Remove the configuration file /etc/samba/smb.conf which was automatically generated during package installation:
2. Join the Domain Controller as a member of the domain. Replace the values mydomain.lan, MYDOMAIN.LAN and MYDOMAIN with the values of your domain:
3. Modify the DNS to point to itself in /etc/resolv.conf:
4. In /etc/samba/smb.conf, add the DNS forwarder:
5. Activate the automatic start of the AD service:
6. Point your Kerberos to the correct configuration file:
Hint !!!
By default Samba-AD provisioning creates an example file krb5.conf in the directory /var/lib/samba/private.
This file is used by default by some Samba calls.
It is best to replace it with a symbolic link to /etc/kbr5.conf to avoid some side effects.
7. Restart Samba:
8. Check that the DNS entries have been created:
Configuring SYSVOL
1. Graphically, you can retrieve the content of \srvads\sysvol from srvads1 and copy it to srvads2 from a Windows workstation as Domain Administrator. Or with command lines, on srvads2, run:
2. Then reset the ACL on SYSVOL, and check the ACLs (it should return nothing if OK):
Validating the new installation
- Check the status of the replications with samba-tool drs showrepl. The replicas may take a few minutes to set up. Once the replicas are correct (5 Inbound replications and 5 Outbound replications), you can proceed to the following checks.
- Test the DNS connection from the DNS Active Directory console.
- Test the connection with the Users and Computers Active Directory console
Check replication:
Check domain level:
Verify DNS SRV records:
Configuring signed NTP
- Configure the NTP by following the NTP service configuration documentation with Samba.
Configuring Bind-DLZ
Before going into production, the internal Samba DNS must be replaced by the Bind-DLZ module. To do this, follow the documentation to integrate Samba with Bind9.
Comments
Post a Comment