.. Reminder for header structure:        
  Parts (H1)          : #################### with overline
  Chapters (H2)       : ******************** with overline
  Sections (H3)       : ====================
  Subsections (H4)    : --------------------
  Subsubsections (H5) : ^^^^^^^^^^^^^^^^^^^^
  Paragraphs (H6)     : """""""""""""""""""""

.. |date| date::

.. meta::
  :description: Storing Bitlocker keys in Samba Active Directory
  :keywords: Security, Samba-AD, documentation

.. _samba_change_ip_address:

##################################
Change Domain Controler IP Address
##################################

First, modify :file:`/etc/network/interfaces` and :file:`/etc/hosts` files with the new IP.

If you have two or more domain controllers, modify :file:`/etc/krb5.conf` file. 

Check :file:`/etc/resolv.conf` file if needed and the DNS forward set in :file:`/etc/samba/smb.conf`.

Check if :file:`/var/lib/samba/private/krb5.conf` is a symbolic link of :file:`/etc/krb5.conf`.

Reboot the server. Samba will reconfigure him self with the new IP address.

You can check if DNS response are correct with the command : 

.. code-block:: bash

    dig @localhost srvads.domain.lan
    dig @localhost domain.lan
    
Modify the reverse DNS if needed. 