Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#953530: samba-common-bin: post-install fails with "lock directory /run/samba does not exist"

392 views
Skip to first unread message

Gian Piero Carrubba

unread,
Mar 10, 2020, 4:00:03 AM3/10/20
to
Package: samba-common-bin
Version: 2:4.11.5+dfsg-1+b1
Severity: normal

While upgrading samba-common-bin from 2:4.11.5+dfsg-1 to 2:4.11.5+dfsg-1+b1:

---
Performing actions...
Setting up samba-common-bin (2:4.11.5+dfsg-1+b1) ...
Checking smb.conf with testparm
Load smb config files from /etc/samba/smb.conf
Loaded services file OK.
ERROR: lock directory /run/samba does not exist

ERROR: pid directory /run/samba does not exist

Server role: ROLE_STANDALONE

dpkg: error processing package samba-common-bin (--configure):
installed samba-common-bin package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
samba-common-bin
E: Sub-process /usr/bin/dpkg returned an error code (1)
---

samba-common-bin was installed as a dependency of smbclient, the "server
role" message is misleading as I don't have any need for a SMB server
(and for any lock or pidfile, afaik).

Thank you,
Gian Piero.

-- System Information:
Debian Release: bullseye/sid
APT prefers unstable
APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 5.4.0-4-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US:en (charmap=UTF-8)
Shell: /bin/sh linked to /usr/bin/dash
Init: sysvinit (via /sbin/init)
LSM: AppArmor: enabled

Versions of packages samba-common-bin depends on:
ii libbsd0 0.10.0-1
ii libc6 2.29-10
ii libgnutls30 3.6.12-2
ii libldap-2.4-2 2.4.49+dfsg-2
ii libncurses6 6.2-1
ii libpopt0 1.16-14
ii libreadline8 8.0-4
ii libtalloc2 2.3.0-5
ii libtdb1 1.4.2-3+b1
ii libtevent0 0.10.1-4
ii libtinfo6 6.2-1
ii libwbclient0 2:4.11.5+dfsg-1+b1
ii python3 3.8.2-1
ii python3-samba 2:4.11.5+dfsg-1+b1
ii samba-common 2:4.11.5+dfsg-1
ii samba-libs 2:4.11.5+dfsg-1+b1

Versions of packages samba-common-bin recommends:
ii samba-dsdb-modules 2:4.11.5+dfsg-1+b1

Versions of packages samba-common-bin suggests:
pn heimdal-clients <none>
ii python3-dnspython 1.16.0-2
pn python3-markdown <none>

-- no debconf information

Kevin Locke

unread,
Jun 23, 2020, 5:10:04 AM6/23/20
to
On Tue, 2020-03-10 at 08:40 +0100, Gian Piero Carrubba wrote:
> Package: samba-common-bin
> Version: 2:4.11.5+dfsg-1+b1
> Severity: normal
>
> While upgrading samba-common-bin from 2:4.11.5+dfsg-1 to 2:4.11.5+dfsg-1+b1:
>
> ---
> Performing actions...
> Setting up samba-common-bin (2:4.11.5+dfsg-1+b1) ...
> Checking smb.conf with testparm
> Load smb config files from /etc/samba/smb.conf
> Loaded services file OK.
> ERROR: lock directory /run/samba does not exist
>
> ERROR: pid directory /run/samba does not exist
>
> Server role: ROLE_STANDALONE
>
> dpkg: error processing package samba-common-bin (--configure):
> installed samba-common-bin package post-installation script subprocess returned error exit status 1
> Errors were encountered while processing:
> samba-common-bin
> E: Sub-process /usr/bin/dpkg returned an error code (1)
> ---

I just ran into the same issue with a fresh install of
2:4.11.5+dfsg-1+b1. For reference, packaging/systemd/README contains
the following warning:

> If you're a packager don't forget to run the systemd-tmpfiles binary
> in the script after samba has been installed. This makes sure the
> directory exists and you can start samba directly after the installation.
>
> /usr/bin/systemd-tmpfiles --create /etc/tmpfiles.d/samba.conf

Presumably that should be changed to

/bin/systemd-tmpfiles --create /usr/lib/tmpfiles.d/samba.conf

for the current Debian packaging.

Cheers,
Kevin

packaging/systemd/README: https://git.samba.org/samba.git/?p=samba.git;a=blob;f=packaging/systemd/README

Bryce Harrington

unread,
Feb 11, 2021, 8:30:04 PM2/11/21
to
Fwiw, ubuntu reporters have hit this issue as well:

https://bugs.launchpad.net/debian/+source/samba/+bug/1886114

We've not yet reproduced the error about /run/samba, but I found one way
to make it fail to get into an installation failure state:

$ sudo apt-get install samba
$ sudo apt-get remove --purge samba-common-bin
$ sudo rm -rf /run/samba
$ sudo rm -rf /etc/samba
$ sudo apt-get install samba-common-bin
Reading package lists... Done
...
Setting up samba-common-bin (2:4.13.3+dfsg-1ubuntu2) ...
Checking smb.conf with testparm
Load smb config files from /etc/samba/smb.conf
Error loading services.
dpkg: error processing package samba-common-bin (--configure):
installed samba-common-bin package post-installation script subprocess returned error exit status 1

After this it will continue to exhibit error messages similar to what
other reporters have seen.

To restore the system back to working order, this seems to do it:

$ sudo apt-get remove --purge *samba*
$ sudo apt-get install samba

I tried tampering with and removing /run/samba at various points, and
tinkering with /usr/lib/tmpfiles.d/samba.conf in various ways, but
wasn't able to generate the "lock directory /run/samba does not exist"
issue.

I also tested the above with 2:4.11.6+dfsg-0ubuntu1.6, and found it
gives identical behavior as above.

Diederik de Haas

unread,
Mar 19, 2022, 8:30:03 PM3/19/22
to
On vrijdag 18 maart 2022 23:28:33 CET Diederik de Haas wrote:
> And indeed I do not have a /run/samba/ directory on my Bookworm
> system/server.

After I manually created /run/samba/, the installation succeeded.
signature.asc

Diederik de Haas

unread,
Mar 23, 2022, 9:50:03 AM3/23/22
to
On woensdag 23 maart 2022 06:54:57 CET Axel Beckert wrote:
> Gian Piero Carrubba wrote:
> > Init: sysvinit (via /sbin/init)
>
> Diederik de Haas wrote:
> > I do not have a /run/samba/ directory on my Bookworm system/server.
> > I don't think it's relevant, but it (still?) has sysv-init as init.
> I think, I see a pattern here: My three affected hosts have sysvinit,
> too (on purpose).

Yeah, that's a pattern :-)

Looking a bit further and I found https://bugs.debian.org/975422 through
https://salsa.debian.org/samba-team/samba/-/commit/0c3b2056764cd1a566766c3e1764d7c312eab5d7
titled: "Ensure systemd-tmpfiles is called before testparm (Closes: #975422)"

This seems highly relevant for this issue.

On woensdag 23 maart 2022 06:54:57 CET Axel Beckert wrote:
> The reason why this pops up now with multiple people again is probably
> that we had a bunch of important kernel updates and hence reboots and
> empty /run/ tmpfs after reboot — which brings up this issue again even
> if you had created /run/samba/ manually after the previous reboot.

My (Xen Dom0) *Bookworm* system/server is somewhat unusual in that it's off
most of the time and reboots (or cold boots) happen more regular then what
most people expect for a Xen Dom0 system.
Not sure what to make of this and whether it's relevant ...

Cheers,
Diederik
signature.asc

Michael Tokarev

unread,
Mar 23, 2022, 10:30:04 AM3/23/22
to
23.03.2022 16:38, Diederik de Haas wrote:
> On woensdag 23 maart 2022 06:54:57 CET Axel Beckert wrote:
>> Gian Piero Carrubba wrote:
>>> Init: sysvinit (via /sbin/init)
>>
>> Diederik de Haas wrote:
>>> I do not have a /run/samba/ directory on my Bookworm system/server.
>>> I don't think it's relevant, but it (still?) has sysv-init as init.
>> I think, I see a pattern here: My three affected hosts have sysvinit,
>> too (on purpose).
>
> Yeah, that's a pattern :-)
>
> Looking a bit further and I found https://bugs.debian.org/975422 through
> https://salsa.debian.org/samba-team/samba/-/commit/0c3b2056764cd1a566766c3e1764d7c312eab5d7
> titled: "Ensure systemd-tmpfiles is called before testparm (Closes: #975422)"

How about just mkdir -p /run/samba at the place of #DEBHELPER# in there ?

/mjt
0 new messages