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 even use Michael Tokarev's Samba repositories. (Michael is the official Debian Samba packager/maintainer for Debian.)
If you want to use a more recent version of the Samba software, see the instructions for either Using backports or Using Michael Tokarev's repos.
Once you have decided and configured which version to use, then:
apt-get update && apt-get install --no-install-recommends krb5-user krb5-config libldb2 libnss-winbind libpam-winbind libwbclient0 python3-ldb python3-samba samba samba-common samba-common-bin samba-dsdb-modules samba-libs samba-vfs-modules winbind
Caponato's Samba notebook. Start here or else Main menu