package winbind 2:4.7.6+dfsg~ubuntu-0ubuntu2.2 failed to install/upgrade: installed winbind package post-installation script subprocess returned error exit status 1

Bug #1787834 reported by Mike Clement
32
This bug affects 6 people
Affects Status Importance Assigned to Milestone
samba (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

 Started after update last week. error also during update. failed to configure Samba

ProblemType: Package
DistroRelease: Ubuntu 18.04
Package: winbind 2:4.7.6+dfsg~ubuntu-0ubuntu2.2
ProcVersionSignature: Ubuntu 4.15.0-32.35-generic 4.15.18
Uname: Linux 4.15.0-32-generic x86_64
ApportVersion: 2.20.9-0ubuntu7.3
Architecture: amd64
Date: Wed Aug 15 20:28:48 2018
ErrorMessage: installed winbind package post-installation script subprocess returned error exit status 1
NmbdLog:

Python3Details: /usr/bin/python3.6, Python 3.6.5, python3-minimal, 3.6.5-3ubuntu1
PythonDetails: /usr/bin/python2.7, Python 2.7.15rc1, python-minimal, 2.7.15~rc1-1
RelatedPackageVersions:
 dpkg 1.19.0.5ubuntu2
 apt 1.6.3
SambaServerRegression: Yes
SmbConfIncluded: Yes
SmbLog:

SourcePackage: samba
TestparmExitCode: 1
Title: package winbind 2:4.7.6+dfsg~ubuntu-0ubuntu2.2 failed to install/upgrade: installed winbind package post-installation script subprocess returned error exit status 1
UpgradeStatus: Upgraded to bionic on 2018-05-08 (102 days ago)
WindowsFailedConnect: Yes

Revision history for this message
Mike Clement (mac273) wrote :
tags: removed: need-duplicate-check
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Thanks for filing this bug in Ubuntu.

You have syntax errors in your /etc/samba/smb.conf configuration file, as detected by testparm:
Load smb config files from /etc/samba/smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
WARNING: The "syslog" option is deprecated
WARNING: The "null passwords" option is deprecated
WARNING: Ignoring invalid value 'nomao to guest = bad user' for parameter 'server schannel'
Error loading services.

In particular, this line:
server schannel = nomao to guest = bad user

You probably meant it to read:
server schannel = no
map to guest = bad user

Please fix that, and then run these commands:
sudo apt update
sudo apt -f install

I'm going to mark this bug as "invalid" since it looks like the failure was caused by a bad configuration file. If you believe that is not the case, please set the bug status back to "new" and state your reasoning.

Thanks

Changed in samba (Ubuntu):
status: New → Invalid
Revision history for this message
linixpatrick (pheadley) wrote :

I'm using Ubuntu as a an Active Directory domain controller. During updates the error is generated. It appears that since winbind is a sub process of the samba ad dc the installer is unable to manage winbind in the same way as if winbind was started as a stand-alone service at boot time. I have run testparm with no errors and the samba ad-dc is still working. I tried stopping the samba ad dc service and updating windbind but that doesn't work either.

Revision history for this message
Steven Illgen (stkve) wrote :

I understand the status of this is invalid; however, my organization has a number of Ubuntu Servers that suffer from the same problem. This only happens with Ubuntu 18.04 and it causes problems, especially when attempting to automate package installation and server configurations on a large scale.

After some exploration, it appears the problem may be in the postinst script of the winbind package itself.

The first part of the code adds the 'winbindd_priv' group and creates the /var/lib/samba/winbind_privileged socket directory. Then (and this is where I have a question), it checks to see if the /etc/init.d/winbind file exists. If it does, it proceeds to configure the init.d start/stop processes with update-rc.d followed by attempting to either start (if a new build) or restart (if an upgrade) the service. This is where the failure is occurring because winbind for Ubuntu 18.04 is supposed to be using systemd and is conflicted when attempting to set up the two.

One of the ways I was able to get this to work was to simply remove the /etc/init.d/winbind file and run dpkg --configure winbind. The install completed without any further issues and shows that this is where the pain point is.

My question is, other than "backwards compatibility" (which we should be well past now), why is there a need to configure the init.d start/stop routines if 18.04 uses systemd? Can the init.d scripting be removed from future packages for Ubuntu so this type of issue doesn't crop up again?

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Hello,

I appreciate that you are having similar problems with winbind, but let's please use a new bug for that. This one here had a clear error in the configuration file.

Steven, I would appreciate a new bug with details of your case, in particular, the config file and the ordering of events that are leading to a postinst failure. I've seen failures in automated deploys where winbind is started before being correctly joined to a domain, or something of the sort. We should definitely find a way to streamline that, if this is the case you are describing.

The bits you mentioned are added by debhelper automatically to any package shipping systemd and/or sysv scripts. This is what is in the samba source package regarding winbind.postinst, for example:
"""
#! /bin/sh

set -e

getent group winbindd_priv >/dev/null 2>&1 ||
    addgroup --system --force-badname --quiet winbindd_priv

winbindd_privileged_socket_directory='/var/lib/samba/winbindd_privileged'
mkdir -pv "$winbindd_privileged_socket_directory"
chgrp -c winbindd_priv "$winbindd_privileged_socket_directory"
chmod -c 0750 "$winbindd_privileged_socket_directory"

#DEBHELPER#
"""

Here, #DEBHELPER# is the special text that is replaced by debhelper with other shell snippets as needed, and is what you probably saw.

Regarding systemd and sysv, I agree that it is confusing to ship both. I have actually seen packages that also ship an upstart snippet along those two.

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.