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

.. |date| date::

.. meta::
  :description: Upgrading a Samba domain controller from Debian11 Bullseye to Debian12 Bookworm
  :keywords: upgrade, Debian, Bullseye, Bookworm, documentation

.. _server_upgrade_debian11_to_debian12:

###############################################################################
Upgrading a Samba domain controller from Debian11 Bullseye to Debian12 Bookworm
###############################################################################

.. warning::

   If you use **eth** type network interfaces, you should set yourself in grub to keep your interface in **eth** format.   

* You need to reconfigure tissamba.list :

.. highlight:: bash

.. parsed-literal::

  wget -qO- https://samba.tranquil.it/tissamba-pubkey.gpg | tee /usr/share/keyrings/tissamba.gpg > /dev/null
  sha256sum /usr/share/keyrings/tissamba.gpg
    95ab9a408a3e94564f5a9bfb6e82c9dc371f32e92004ee98acbf64b431c93e81  /usr/share/keyrings/tissamba.gpg
  echo "deb [signed-by=/usr/share/keyrings/tissamba.gpg] https://samba.tranquil.it/debian/samba-|version|/ $(lsb_release -c -s) main" > /etc/apt/sources.list.d/tissamba.list

.. warning::

    For Samba versions earlier than 4.22.7 please use this :mimetype:`gpg` key

    .. code-block::
      
        wget -qO- https://samba.tranquil.it/tissamba-pubkey-2017.gpg | tee /usr/share/keyrings/tissamba.gpg > /dev/null


* Update repositories configuration for NonFreeFirmware, update all PGP keys and all repositories :

  .. code-block:: bash

   echo 'APT::Get::Update::SourceListWarnings::NonFreeFirmware "false";' > /etc/apt/apt.conf.d/no-bookworm-firmware.conf
   sed -i 's/bullseye/bookworm/g' /etc/apt/sources.list /etc/apt/sources.list.d/*

* Update the host:

  .. code-block:: bash

    apt-get update
    apt-get dist-upgrade

.. hint::
   
   If you have an error during the dist-upgrade, you can use the command "apt --fix-broken install" to fix it.


* Change the ntp configuration with chronyd: :ref:`configure the NTP service (chrony) <server_install_ntp_debian>`. **This is a very important step !**

* Restart the host:

  .. code-block:: bash

    reboot

* Check the version of the Samba server:

  .. code-block:: bash

    samba-tool --version
