samba creates temporary files in /tmp, but never deletes them

Bug #1852994 reported by Thomas Schweikle
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
samba (Ubuntu)
Fix Released
Undecided
Unassigned
Focal
New
Undecided
Unassigned
Impish
Won't Fix
Undecided
Unassigned

Bug Description

Samba creates temporary files in /tmp, but never deletes them:

$ ll /tmp/
insgesamt 16
drwxrwxrwt 1 root root 3492 Nov 18 13:21 ./
drwxr-xr-x 1 root root 256 Okt 8 23:31 ../
drw------- 1 root root 12 Nov 18 12:56 adcli-krb5-0eKi4r/
drw------- 1 root root 12 Nov 18 13:17 adcli-krb5-1etwrd/
drw------- 1 root root 12 Nov 18 13:11 adcli-krb5-4Te6c7/
drw------- 1 root root 12 Nov 18 12:48 adcli-krb5-4X6pk7/
drw------- 1 root root 12 Nov 18 12:57 adcli-krb5-5bHzPd/
drw------- 1 root root 12 Nov 18 12:43 adcli-krb5-79TK1F/
drw------- 1 root root 12 Nov 18 13:08 adcli-krb5-9qj6tq/
drw------- 1 root root 12 Nov 18 13:05 adcli-krb5-Ah9lc8/
drw------- 1 root root 12 Nov 18 13:21 adcli-krb5-b0iYwE/
drw------- 1 root root 12 Nov 18 13:07 adcli-krb5-Baee1a/
drw------- 1 root root 12 Nov 18 13:17 adcli-krb5-bCFxM0/
drw------- 1 root root 12 Nov 18 12:57 adcli-krb5-bYGBiN/
drw------- 1 root root 12 Nov 18 13:14 adcli-krb5-CeT40X/
drw------- 1 root root 12 Nov 18 13:00 adcli-krb5-cOW7Bt/
drw------- 1 root root 12 Nov 18 13:20 adcli-krb5-eeukGV/
drw------- 1 root root 12 Nov 18 12:43 adcli-krb5-Ei84fn/
drw------- 1 root root 12 Nov 18 12:51 adcli-krb5-ERsyGO/
drw------- 1 root root 12 Nov 18 13:15 adcli-krb5-eY2JWU/
drw------- 1 root root 12 Nov 18 12:59 adcli-krb5-fMhsgy/
drw------- 1 root root 12 Nov 18 12:51 adcli-krb5-GeXv9l/
drw------- 1 root root 12 Nov 18 12:48 adcli-krb5-H5PIVZ/
drw------- 1 root root 12 Nov 18 12:50 adcli-krb5-iaA4w5/
drw------- 1 root root 12 Nov 18 13:19 adcli-krb5-JtKFcm/
drw------- 1 root root 12 Nov 18 13:16 adcli-krb5-jUYuhE/
drw------- 1 root root 12 Nov 18 13:01 adcli-krb5-Lc3Tqw/
drw------- 1 root root 12 Nov 18 13:18 adcli-krb5-lFewBt/
drw------- 1 root root 12 Nov 18 13:08 adcli-krb5-LFpSsL/
drw------- 1 root root 12 Nov 18 13:11 adcli-krb5-lMSdvP/
drw------- 1 root root 12 Nov 18 13:18 adcli-krb5-MBcf2g/
[an other 100 …]

ProblemType: Bug
DistroRelease: Ubuntu 19.10
Package: samba 2:4.10.7+dfsg-0ubuntu2.2
ProcVersionSignature: Ubuntu 5.3.0-23.25-generic 5.3.7
Uname: Linux 5.3.0-23-generic x86_64
ApportVersion: 2.20.11-0ubuntu8.2
Architecture: amd64
CIFSMounts:

Date: Mon Nov 18 13:20:09 2019
InstallationDate: Installed on 2019-09-09 (69 days ago)
InstallationMedia: Xubuntu 19.04 "Disco Dingo" - Release amd64 (20190416)
ProcEnviron:
 LANGUAGE=de_DE
 TERM=screen
 PATH=(custom, no user)
 LANG=de_DE.UTF-8
 SHELL=/bin/bash
SambaClientRegression: Yes
SourcePackage: samba
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Thomas Schweikle (tps) wrote :
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Hi Thomas,
I assume you use sssd+kerberos to join an active directory or such?
Is that correct, could you summarize your setup so that people can try to reproduce this?

Have you already identified on which action new tmp directories are created - is it logging into the AD or some other action on the samba server that can be identified?

In general I'm not sure how much services are are supposed to clean up while running.
Do these files stays around through a a restart of the samba service?

Changed in samba (Ubuntu):
status: New → Incomplete
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

This pretty much sounds like [1][2].

While there might be a fix for it in the future in the code (the BZ looks that way) There are two important things to take away right now:

1. it seems to depend on a slight misconfiguration (different in lower/upper case in user name)
   Something similar might apply to your case
2. There is a workaround in adding this to sssd config that seems to clean them
     ad_maximum_machine_account_password_age = 0

[1]: https://<email address hidden>/thread/2HVF6QN3WPC5LMXPG5U6DEQSNUWUIHD5/
[2]: https://bugzilla.redhat.com/show_bug.cgi?id=1588596

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Please report back with the details asked for and if possible with your results from trying the workarounds (or fixing the root cause if it is user name case or something similar) in the links I provided.

Revision history for this message
Thomas Schweikle (tps) wrote :

It is fixed with the latest samba-version (4.15.5~dfsg-0ubuntu1) available within Ubuntu-Repositories.

Revision history for this message
Lucas Kanashiro (lucaskanashiro) wrote :

Thanks for letting us know Thomas, since this is already fixed in Jammy I am marking this task as Fix Released. I am adding tasks for Focal and Impish to check if this bug is still present there.

Changed in samba (Ubuntu):
status: Incomplete → Fix Released
Revision history for this message
Michał Małoszewski (michal-maloszewski99) wrote :

Hi Thomas,

The SRU process requires an easy to follow test case be documented with the bug, to allow it to be easily validated. Is that something you could assist us with in writing? You can see an example of what we're looking for from the [Test Case] in this bug report:

https://bugs.launchpad.net/ubuntu/+source/apache2/+bug/1988224

It should hopefully help us expedite. Then I will take care of fixing that bug.

Thank you in advance.

Revision history for this message
Lena Voytek (lvoytek) wrote :

Impish is no longer in support, marking as wont fix.

Changed in samba (Ubuntu Impish):
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.