Univention Bugzilla – Bug 41049
Installation of samba-libs fails if old secrets.tdb or pass.tdb exist
Last modified: 2016-04-18 11:20:22 CEST
UCS 3.2-8, Samba/NT, Update from Errata 411 to 420 The installation of samba-libs (afaik new dependency) fails under certain circumstances: > Unpacking samba-libs (from .../samba-libs_2%3a4.3.7-1.827.201604110946_amd64.deb) ... > secrets.tdb exists in /var/lib/samba and /var/lib/samba/private, aborting samba-libs preinst > rename one of them to allow the install/upgrade to continue > http://bugs.debian.org/726472 > /var/lib/samba: > total 2180 > drwxr-xr-x 8 root root 4096 Apr 13 03:00 . > drwxr-xr-x 51 root root 4096 Jun 10 2015 .. > -rw------- 1 root root 16384 Oct 16 08:25 account_policy.tdb > drwsrwsr-x 10 root Printer-Admins 4096 Feb 10 2014 drivers > -rw------- 1 root root 696 Apr 2 2013 group_mapping.tdb > drwxr-xr-x 3 root root 4096 Apr 2 2013 netlogon > drwxr-xr-x 10 root root 4096 Apr 2 2013 printers > drwxr-xr-x 2 root root 4096 May 20 2015 private > -rw------- 1 root root 2084864 May 20 2015 registry.tdb > -rw------- 1 root root 45056 May 6 2015 secrets.tdb > -rw------- 1 root root 16384 Apr 2 2013 share_info.tdb > drwxrwx--T 2 root sambashare 4096 Apr 2 2013 usershares > -rw------- 1 root root 32768 Apr 13 12:02 winbindd_cache.tdb > drwxr-x--- 2 root root 4096 Apr 13 03:00 winbindd_privileged > /var/lib/samba/private: > total 444 > drwxr-xr-x 2 root root 4096 May 20 2015 . > drwxr-xr-x 8 root root 4096 Apr 13 03:00 .. > -rw------- 1 root root 16384 Apr 2 2013 passdb.tdb > -rw------- 1 root nagios 430080 Mar 26 01:01 secrets.tdb > dpkg: error processing /var/cache/apt/archives/samba-libs_2%3a4.3.7-1.827.201604110946_amd64.deb (--unpack): > subprocess new pre-installation script returned error exit status 1 > configured to not write apport reports > Errors were encountered while processing: > /var/cache/apt/archives/samba-libs_2%3a4.3.7-1.827.201604110946_amd64.deb > E: Sub-process /usr/bin/dpkg returned an error code (1) This can happen at least for: * /var/lib/samba/secrets.tdb * /var/lib/samba/pass.tdb Maybe this could be checked via preup.sh? Alternatively a SDB article with a workaround (renaming the file(s)) should be created.
Created attachment 7592 [details] samba-libs.preinst.patch Patch proposal
For the UCS 4.0 upgrade this was fixed via preup.sh (Bug #37534)
samba ist mit Patch für samba-libs.preinst neu gebaut. Advisory: samba.yaml
OK - samba version OK - patch OK - *.tdb files are renamed during installation -> find /var/lib/samba/ /var/lib/samba/ /var/lib/samba/private /var/lib/samba/private/secrets.tdb /var/lib/samba/netlogon /var/lib/samba/netlogon/scripts /var/lib/samba/secrets.tdb.bak_160414 Entpacken von samba-libs (aus .../samba-libs_2%3a4.3.7-1.827.201604141315_amd64.deb) ... -rw-r--r-- 1 root root 9 14. Apr 15:06 /var/lib/samba/private/secrets.tdb -rw-r--r-- 1 root root 5 14. Apr 15:06 /var/lib/samba/secrets.tdb secrets.tdb exists in /var/lib/samba and /var/lib/samba/private, renaming /var/lib/samba/secrets.tdb to /var/lib/samba/secrets.tdb.bak_160414 OK - installation univention-samba4 (s4search, net rpc testjoin) OK - samba.yaml
<http://errata.software-univention.de/ucs/3.2/421.html>
`apt-get install samba=2:4.3.7-1.827.201604141315` fails: >Starting SMB/CIFS daemon: smbd >/usr/sbin/smbd: error while loading shared libraries: libwinbind-client.so: cannot open shared object file: No such file or directory > failed! Samba was not installed previously, so this is a post-install on a new system. # ldd /usr/sbin/smbd libwinbind-client.so => not found /usr/sbin/smbd /usr/lib//samba/libsmbd-base.so.0 /usr/lib//samba/libprinting-migrate.so.0 /usr/lib/libsmbconf.so.0 /usr/lib//samba/libcli-smb-common.so.0 /usr/lib/libgensec.so.0 /usr/lib/libwbclient.so.0 libwinbind-client.so MISSING # dpkg -S /usr/lib/libwbclient.so.0 libwbclient0: /usr/lib/libwbclient.so.0 # dpkg-query -W libwbclient0 libwbclient0 2:4.1.0-1.821.201512142147
I turned Comment 6 into a proper bug report, see Bug 41066.