til

Error About Samba

When I install kubuntu-desktop use sudo apt-get install -y kubuntu-desktop, get error:

Setting up samba-common-bin (2:4.11.6+dfsg-0ubuntu1.6) ...
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).

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

References:

  1. https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=953530