Bug 41480 - Installing and purging samba permanently removes /var/log/samba
Installing and purging samba permanently removes /var/log/samba
Status: RESOLVED WONTFIX
Product: UCS
Classification: Unclassified
Component: Samba4
UCS 4.2
Other Linux
: P5 normal (vote)
: ---
Assigned To: Samba maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2016-06-06 19:13 CEST by Arvid Requate
Modified: 2020-07-03 20:51 CEST (History)
1 user (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 3: Simply Wrong: The implementation doesn't match the docu
Who will be affected by this bug?: 1: Will affect a very few installed domains
How will those affected feel about the bug?: 2: A Pain – users won’t like this once they notice it
User Pain: 0.034
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Arvid Requate univentionstaff 2016-06-06 19:13:12 CEST
After installing and purging univention-samba4 the directory /var/log/samba is gone and it doesn't come back.

Details:

The package samba-common installs the directory /var/log/samba. The I did this:

univention-install univention-samba4

apt-get purge attr ldb-tools libaio1 samba samba-dsdb-modules \
    samba-vfs-modules tdb-tools univention-samba-local-config \
    univention-samba4 univention-samba4-sysvol-sync winbind

After that the samba-common package is still installed, but /var/log/samba is missing. By accident I did this on an unjoined UCS 4.1-2 Slave to test UCS@school installation stuff. Then I installed UCS@school on that system and got these error messages in some log files:

==========================================================================
Configure 97libunivention-ldb-modules.inst Mon Nov 23 20:48:32 CET 2015
2015-11-23 20:48:32.556628092+01:00 (in joinscript_init)
invoke-rc.d: initscript univention-s4-connector, action "crestart" failed.
Stopping NetBIOS name server: nmbd.
Starting NetBIOS name server: nmbdmkdir failed on directory /var/log/samba/cores: Datei oder Ver
zeichnis nicht gefunden
Failed to create /var/log/samba/cores for user 0 with mode 0700
Unable to setup corepath for nmbd: Datei oder Verzeichnis nicht gefunden
[2015/11/23 20:48:36.099686,  0, pid=26227] ../lib/util/debug.c:947(reopen_logs_internal)
  Unable to open new log file '/var/log/samba/log.nmbd': Datei oder Verzeichnis nicht gefunden
[2015/11/23 20:48:36.100587,  0, pid=26227] ../lib/util/debug.c:947(reopen_logs_internal)
  Unable to open new log file '/var/log/samba/log.nmbd': Datei oder Verzeichnis nicht gefunden
==========================================================================

==========================================================================
management-console-module-schoolinstaller.log:

23.11.15 20:38:01.649  MODULE      ( PROCESS ) : Failed to create /var/log/samba/cores for user 0 with mode 0700
[...]
23.11.15 20:40:28.192  MODULE      ( PROCESS ) : Unable to open new log file '/var/log/samba/log.winbindd': Datei oder Verzeichnis nicht gefunden
==========================================================================
Comment 1 Arvid Requate univentionstaff 2016-06-06 20:36:45 CEST
It's /var/lib/dpkg/info/samba.postrm:

==============================================================
if [ "$1" = purge ]; then

        # Remove Samba's state files, both volatile and non-volatile
        rm -Rf /var/run/samba/ /var/cache/samba/ /var/lib/samba

        # Remove log files
        rm -Rf /var/log/samba/

        # [...]
fi
==============================================================
Comment 2 Ingo Steuwer univentionstaff 2020-07-03 20:51:09 CEST
This issue has been filed against UCS 4.2.

UCS 4.2 is out of maintenance and many UCS components have changed in later releases. Thus, this issue is now being closed.

If this issue still occurs in newer UCS versions, please use "Clone this bug" or reopen it and update the UCS version. In this case please provide detailed information on how this issue is affecting you.