Page 1 of 1

[SOLVED] Problem updating Samba from 4.16 to 4.20

Published: July 14, 2025 - 3:34 PM
by Vincent38
Hello

, I'm having a small problem. I'm trying to update my domain controller, currently running Debian 11 and Samba 4.16 (Tranquil.it version), to Debian 12 with Samba 4.20, following the procedure outlined in your Samba documentation (https://samba.tranquil.it/doc/fr/samba_ ... ian12.html).
I'm getting an error message, apparently a configuration issue with winbind and samba-libs, which is trying to overwrite packages belonging to Samba 4.16.
But since it's a package that's apparently extracted to a temporary directory and deleted after apt fails, I can't force its installation, except perhaps by manually extracting the package in question?
But that's a bit beyond my expertise; I'm not an apt pro, :D

and "apt --fix-broken install" doesn't solve anything.
I've attached the output of the two commands.

Any help would be appreciated. :)

Thanks.

Re: Problem updating Samba from 4.16 to 4.20

Published: July 14, 2025 - 4:07 PM
by Vincent38
The problem seems to have appeared from the samba 4.19 package onwards; I can upgrade my samba to 4.18 without any problems.

Re: Problem updating Samba from 4.16 to 4.20

Published: July 15, 2025 - 4:07 PM
by yalemu
Hello Vincent,

I just tested the upgrade from 4.16.5 debian11 to 4.20.8 debian12 samba - and it works with this procedure:

Code: Select all

apt update
apt dist-upgrade -y
wget -qO-  https://samba.tranquil.it/tissamba-pubkey.gpg | tee /usr/share/keyrings/tissamba.gpg > /dev/null
sha256sum /usr/share/keyrings/tissamba.gpg
echo "deb [signed-by=/usr/share/keyrings/tissamba.gpg] https://samba.tranquil.it/debian/samba-4.20/ $(lsb_release -c -s) main" > /etc/apt/sources.list.d/tissamba.list
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/*
apt-get update
apt-get dist-upgrade
apt --fix-broken install
reboot
apt dist-upgrade
If you are on version 4.19 - there have been quite a few changes to the Debian packages. You will need to at least perform a

Code: Select all

apt --fix-broken install
twice in a row for it to work - restart the VM, and do it again

Code: Select all

apt dist-upgrade
If this works for you, I will update the public documentation accordingly :) .

Good day,

Re: Problem updating Samba from 4.16 to 4.20

Published: July 15, 2025 - 5:09 PM
by Vincent38
Hello

, unfortunately no, that doesn't work either.

However, I'm on version 4.16.11, not 4.16.5. Perhaps there's a problem specific to 4.16.11?

I've attached the output of "apt dist-upgrade" after rebooting.

Running "fix-broken" again doesn't solve anything :D ; I get the same result as the first time.

Thank you.

Re: Problem updating Samba from 4.16 to 4.20

Published: July 15, 2025 - 5:25 PM
by Vincent38
Alternatively, I thought about setting up a second DC on a deb 12 VM with Samba 4.20, adding it to the domain as DC2, copying the sysvol and netlogon folders and the idmap.ldb file onto it, and then finally unmounting DC1. :D
It seems to me that this is equivalent to cloning DC1, which would suit me, but I've never tried it, so I'm not sure. :lol:

Edit: Apart from the fact that I have the rfc2307 option enabled on DC1 (done during installation), I need to figure out how to do it for DC2, since it won't be auto-provisioned, it will probably have to be done manually...

Re: Problem updating Samba from 4.16 to 4.20

Published: July 16, 2025 - 2:31 PM
by Vincent38
Incidentally, I searched but found nothing. Do you have a newsletter I can subscribe to regarding your Samba packages to stay informed about updates?
And can I install directly from your Samba 4.22 package?
Thank you.

Re: Problem updating Samba from 4.16 to 4.20

Published: July 16, 2025 - 6:20 PM
by yalemu
Hello Vincent,

It seems the distribution upgrade is really messed up...

You can try this:

Code: Select all

apt-get remove samba winbind libnss-winbind krb5-user smbclient ldb-tools python3-cryptography samba-vfs-modules samba-dsdb-modules samba-libs libwbclient0 samba-common-bin samba-common python3-samba winbind libnss-winbind samba-common-bin ldb-tools  libldb2 libtdb1 libtalloc2 -y tdb-tools  dirmngr gnupg gnupg-utils gpg gpg-agent gpg-wks-client gpg-wks-server gpgconf gpgsm libtevent0 python3-apt python3-cffi-backend python3-gpg python3-ldb python3-pycurl python3-talloc python3-tdb python3-yaml libgpgme11 python3-pysimplesoap python3-reportbug apt-listchanges python3-debianbts reportbug
If there are still dependencies that cause problems of this kind:

Code: Select all

 python3-tdb : Depends: libtdb1 (= 2:1.4.10-1bookworm1) but it is not going to be installed
               Depends: python3 (>= 3.11~) but 3.9.2-3 is to be installed
Add "python3-tdb" to the list of dependencies to remove

Then

Code: Select all

apt-get install samba winbind libnss-winbind krb5-user smbclient ldb-tools python3-cryptography samba-vfs-modules samba-dsdb-modules samba-libs libwbclient0 samba-common-bin samba-common python3-samba winbind libnss-winbind samba-common-bin ldb-tools  libldb2 libtdb1 libtalloc2 -y tdb-tools  dirmngr gnupg gnupg-utils gpg gpg-agent gpg-wks-client gpg-wks-server gpgconf gpgsm libtevent0 python3-apt python3-cffi-backend python3-gpg python3-ldb python3-pycurl python3-talloc python3-tdb python3-yaml libgpgme11 python3-pysimplesoap python3-reportbug apt-listchanges python3-debianbts reportbug
(Having added the missing package to the list during uninstallation).

Then try a dist-upgrade to update all the packages on the machine.

We're going to avoid rebuilding a machine just because of a dependency problem :) But otherwise yes, it's possible to switch to our 4.22 repository and join the machine as a secondary DC :)

We don't have a list, but I'll definitely keep that in mind for later.

Keep me informed!

Have a good rest of the day

Re: Problem updating Samba from 4.16 to 4.20

Published: July 18, 2025 - 4:58 PM
by Vincent38
Well, that didn't work either.

It seems the problem is with Samba 4.16.11, since even reinstalling it didn't solve the issue.

But I finally managed to get it working :D .

Here's what I had to do:

- remove the Samba packages and related files you indicated
- add a correct DNS server in /etc/resolv.conf
- run "apt autoremove"
- ​​reboot
- update Deb 11 to 12
- reinstall "lsb-release" which had been removed, causing the Tissamb repo update command to crash.

Then I was able to install Samba 4.20 without any problems (keeping smb.conf, krb5.conf, etc.), everything seemed to be working (after a few systemd and chrony bug fixes).

I even managed to update to Samba 4.22 right away. :D

Thanks.

Regards

Re: Problem updating Samba from 4.16 to 4.20

Published: July 18, 2025 - 6:08 PM
by yalemu
Thanks so much for your feedback!

Have a great rest of the day and a wonderful weekend! :)