This will install Samba from your current repository. Debian does not upgrade Samba to a major release until a new Debian version is released. Therefore, it is advisable to install from Debian Backports or use Michael Tokarev's Samba repositories (Michael is the official Samba packager and maintainer for Debian).
If you wish to use a more updated version of Samba, refer to:
Once you have decided and configured the version you want to use, run:
apt-get update && apt-get install --no-install-recommends \ samba samba-ad-dc krb5-user krb5-config samba-ad-provision \ samba-ad-dc samba-dsdb-modules samba-vfs-modules \ winbind libnss-winbind smbclient tdb-tools python3-cryptography
Caponato's Samba notebook. Start here or else Main menu