libnss-ldap default runlevels cause invoke-rc.d to fail

Bug #1739833 reported by xennex82
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libnss-ldap (Ubuntu)

Bug Description

During postinst invoke-rc.d libnss-ldap start is run.

libnss-ldap comes without any Default-Start levels

On line 390 of invoke-rc.d:

### LOCAL INITSCRIPT POLICY: Enforce need of a start entry
### in either runlevel S or current runlevel to allow start
### or restart.
case ${ACTION} in
    if testexec ${SLINK} ; then
    elif testexec ${KLINK} ; then
    elif testexec ${SSLINK} ; then

Therefore, the (now generated) systemd service is not started.

This causes it to not execute its "Stop" action during shutdown, causing the system to fail booting because nssldap-update-ignoreusers is not run.

Possible remedies:

--- libnss-ldap.orig 2016-10-06 15:42:27.991990056 +0200
+++ libnss-ldap 2016-10-06 15:45:48.921305843 +0200
@@ -6,4 +6,4 @@
 # Required-Stop:
-# Default-Start:
-# Default-Stop: 0 1 6
+# Default-Start: 1 2 5
+# Default-Stop: 0 6
 # Short-Description: Updates /etc/ldap.conf

The "5" is essential as noted above in update-rc.d.

Runlevels 1, 2 and 5 are translated to rescue, multiuser and

By enabling this patch and then running:

update-rc.d libnss-ldap remove
update-rc.d libnss-ldap defaults
invoke-rc.d libnss-ldap start

The systemd service is now started:

dec 22 21:55:26 ubuntu systemd[1]: Starting LSB: Updates /etc/ldap.conf...
dec 22 21:55:26 ubuntu systemd[1]: Started LSB: Updates /etc/ldap.conf.

Whereas before nothing would happen.

Alternatively a systemd service could be added, along the lines of:

Description=Ensure LDAP does not prevent the system from booting



Description: Ubuntu 16.04.3 LTS
Release: 16.04
  Installed: 265-3ubuntu2
  Candidate: 265-3ubuntu2
  Version table:
 *** 265-3ubuntu2 500
        500 xenial/universe amd64 Packages
        100 /var/lib/dpkg/status

Related to:

Revision history for this message
xennex82 (xennex82) wrote :
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "libnssldap_runlevel5.diff" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers