[Pkg-samba-maint] Bug#1055752: `groupadd --force --system sambashare` in samba.postinst is wrong

Osamu Aoki osamu at debian.org
Fri Nov 10 15:04:19 GMT 2023


Source: samba
Severity: normal

Problem: `groupadd --force --system sambashare` in samba.postinst is wrong

Versions:  2:4.17.12+dfsg-0+deb12u1, 2:4.19.2+dfsg-1
Salsa:     0610d7670c6 ("update changelog; upload version 4.19.2+dfsg-1 to unstable", 2023-10-16)

groupadd is in essential but command syntax is not the same as addgroup
from adduser package.  Simply replacing adduser is not the right fix.

I see you committed on this happened from:
  1eb07efc2fb ("d/winbind.postinst: switch addgroup => groupadd and eliminate getent", 2022-11-03)

What happened was adduser is not essential.  So if you don't depend on
it, piuparts fails.  (Yes, there may have been some transitional problem
etc.  But this is the core of the issue.)  So please add depends to
adduser and use the older good code.

If you insist on using groupadd from shadow package, you need to use
something along (but this may still fail on some corner cases:

groupadd -f -K MIN_GID=100 -K MAX_GID=999 sambashare

I still think this use of groupadd is bad idea.

Use of getent in old code should be no problem since it is in libc-bin
which is priority required.

If you still have problem with your local piuparts checks, please check
your base sid image used for it.  If it still has adduser package in it,
remove it.

-- Package-specific info:
* /etc/samba/smb.conf present, but not attached
* /var/lib/samba/dhcp.conf not present

-- System Information:
Debian Release: 12.2
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 6.5.0-0.deb12.1-amd64 (SMP w/12 CPU threads; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

-- no debconf information



More information about the Pkg-samba-maint mailing list