Bug 57902 - Update to UCS 5.1-0 stops due nslcd package postinst failing to run "chage"
Summary: Update to UCS 5.1-0 stops due nslcd package postinst failing to run "chage"
Status: CLOSED FIXED
Alias: None
Product: UCS
Classification: Unclassified
Component: Update - univention-updater
Version: UCS 5.2
Hardware: Other Linux
: P5 normal
Target Milestone: UCS 5.1
Assignee: Arvid Requate
QA Contact: Felix Botner
URL:
Keywords:
Depends on: 56005
Blocks:
  Show dependency treegraph
 
Reported: 2025-01-27 14:09 CET by Arvid Requate
Modified: 2025-02-05 15:08 CET (History)
3 users (show)

See Also:
What kind of report is it?: Development Internal
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Customer ID:
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 2025-01-27 14:09:36 CET
During update to UCS 5.1-0 the nslcd.poistinst failed on one test system (student09):
===
Setting up nslcd (0.9.11-1) ...
Adding system user `nslcd' (UID 122) ...
Adding new group `nslcd' (GID 129) ...
Adding new user `nslcd' (UID 122) with group `nslcd' ...
chage: Permission denied.
Stopped: `/bin/chage -M 99999 nslcd' returned error code 1. Exiting.

Removing user `nslcd' ...
Removing group `nslcd' ...
groupdel: group 'nslcd' does not exist
adduser: `groupdel nslcd' returned error code 6. Exiting.
dpkg: error processing package nslcd (--configure):
 installed nslcd package post-installation script subprocess returned error exit status 1
===

apparently while running this command:

===
root@dn1:~# adduser --system --group --home /var/run/nslcd/ \
            --gecos "nslcd name service LDAP connection daemon" \
            nslcd
Adding system user `nslcd' (UID 122) ...
Adding new group `nslcd' (GID 129) ...
Adding new user `nslcd' (UID 122) with group `nslcd' ...
chage: Permission denied.
Stopped: `/bin/chage -M 99999 nslcd' returned error code 1. Exiting.

Removing user `nslcd' ...
Removing group `nslcd' ...
groupdel: group 'nslcd' does not exist
adduser: `groupdel nslcd' returned error code 6. Exiting.
===

strace indicates that this file might be part of the cause:

===
root@dn1:~# cat /sys/fs/selinux/deny_unknown
1
1root@dn1:~# ls -ld/sys/fs/selinux/deny_unknownn
-r--r--r-- 1 root root 0 Jan 17 12:26 /sys/fs/selinux/deny_unknow
===

With the fix for Bug #56005 we intended to disable selinux. Maybe a reboot was missing on this system? uptime is 10 days, matching the timestamp of the selinuxfs mountpoint.
Comment 1 Arvid Requate univentionstaff 2025-01-27 14:11:46 CET
After rebooting the system, the file /sys/fs/selinux/deny_unknon is gone and the selinuxfs filesystem not mounted any longer. And I can again run "chage -l statd", e.g.

So, we should add a check into the 5.1-0 preup.
Comment 2 Arvid Requate univentionstaff 2025-01-27 16:47:17 CET
48bccba7104 | Add preup check for selinuxfs

Successful build
Package: univention-updater
Version: 16.0.39
Branch: 5.1-0
Comment 3 Arvid Requate univentionstaff 2025-01-27 17:11:19 CET
18f89e3ef31 | Add preup check for selinuxfs

Package: univention-updater
Version: 17.0.30
Branch: 5.2-0