Using Michael Tokarev's Repo

Michael is the designated Samba packager and maintainer for Debian (and Ubuntu). His responsibilities include configuring Samba to operate on Debian and creating updated versions of Samba in advance of the official Debian release process. This allows you to access binaries weeks before they become generally available.

His repository is available here:

http://www.corpit.ru/mjt/packages/samba/

In our case, we will use the Debian Bookworm packages (adjust accordingly for other Debian or Ubuntu versions):

http://www.corpit.ru/mjt/packages/samba/

At the time of writing, the latest version is 4.21.4. As per the README:

http://www.corpit.ru/mjt/packages/samba/README

You could configure his repo by adding this to `sources.list`:

echo "deb http://www.corpit.ru/mjt/packages/samba bookworm/samba-4.21/" >> /etc/apt/sources.list

But it won't work yet. You must first install his GPG key, or `apt-get update` will fail with an error like:

apt-get update
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 701B4F6B1A693E59
[...]

So let's fetch his key and export it to the APT keyrings directory:

apt-get install gpg debian-keyring
gpg --no-default-keyring --keyring=/usr/share/keyrings/debian-keyring.gpg --export mjt@debian.org > /etc/apt/keyrings/tokarev.gpg

Then update the line in `/etc/apt/sources.list` to reference the key:

echo "deb [signed-by=/etc/apt/keyrings/tokarev.gpg] http://www.corpit.ru/mjt/packages/samba bookworm/samba-4.21/" >> /etc/apt/sources.list

Now `apt-get update` should work without issues. Let’s check the version table:

apt-get update && apt-cache policy samba
samba:
  Installed: 2:4.21.3+dfsg-6~bpo12+1
  Candidate: 2:4.21.4+dfsg-1~~mjt+deb12
  Version table:
     2:4.21.4+dfsg-1~~mjt+deb12 500
        500 http://www.corpit.ru/mjt/packages/samba bookworm/samba-4.21/ Packages
  *** 2:4.21.3+dfsg-6~bpo12+1 100
        100 /var/lib/dpkg/status
     2:4.21.3+dfsg-6~~mjt+deb12 500
        500 http://www.corpit.ru/mjt/packages/samba bookworm/samba-4.21/ Packages
     2:4.17.12+dfsg-0+deb12u1 500
        500 http://deb.debian.org/debian bookworm/main amd64 Packages
        500 http://security.debian.org bookworm-security/main amd64 Packages

Debian is now ready to install version 4.21.4 with no extra parameters.

You can now proceed to install a Domain Controller or a Member Server.


Caponato's Samba notebook. Start here or else Main menu