Bug#1116563: gdm3: Version 49 does not start properly
Dmitry Shachnev
mitya57 at debian.org
Sun Sep 28 18:47:50 BST 2025
On Sun, Sep 28, 2025 at 06:21:32PM +0100, Simon McVittie wrote:
> On Sun, 28 Sep 2025 at 20:08:07 +0300, Dmitry Shachnev wrote:
> > Sep 28 19:58:28 l3 unix_chkpwd[1094]: could not obtain user info (gdm-greeter)
>
> What modules does your /etc/nsswitch.conf have registered for the passwd,
> group, shadow and gshadow databases? A typical setup would look like this:
>
> passwd: files systemd
> group: files systemd
> shadow: files systemd
> gshadow: files systemd
Oh, for me the last two lines don't have systemd:
passwd: files systemd
group: files systemd
shadow: files
gshadow: files
And adding systemd there helped, thanks a lot!
> The new gdm version requires libnss-systemd ("systemd" in
> /etc/nsswitch.conf) for its handling of dynamic creation/deletion of
> temporary user IDs.
>
> gdm3 Depends on libnss-systemd, and installing that package *should* set it
> up in nsswitch.conf automatically, but one possible reason for the gdm
> "greeter" (login prompt) not to start up successfully is that this somehow
> hasn't happened.
I am now looking at libnss-systemd postinst, which has the following code:
# Automatically added by dh_installnss/1.7
if [ "$1" = "configure" ] && [ -f "${DPKG_ROOT}/etc/nsswitch.conf.nss.${DPKG_MAINTSCRIPT_PACKAGE}-will-install" ] && [ -e "${DPKG_ROOT}/etc/nsswitch.conf" ] ; then
if ! grep -q -E -e '^group:[^#]*\s(systemd)(\s|#|$)' -e '^gshadow:[^#]*\s(systemd)(\s|#|$)' -e '^passwd:[^#]*\s(systemd)(\s|#|$)' -e '^shadow:[^#]*\s(systemd)(\s|#|$)' "${DPKG_ROOT}/etc/nsswitch.conf" ; then
# Installing passwd/systemd from libnss-systemd in position last
sed -E -i "${DPKG_ROOT}/etc/nsswitch.conf" -e '/^passwd:\s[^#]*$/ s/$/ systemd/' -e '/^passwd:\s.*#/ s/#/ systemd #/'
# Installing group/systemd from libnss-systemd in position last
sed -E -i "${DPKG_ROOT}/etc/nsswitch.conf" -e '/^group:\s[^#]*$/ s/$/ systemd/' -e '/^group:\s.*#/ s/#/ systemd #/'
# Installing shadow/systemd from libnss-systemd in position last
sed -E -i "${DPKG_ROOT}/etc/nsswitch.conf" -e '/^shadow:\s[^#]*$/ s/$/ systemd/' -e '/^shadow:\s.*#/ s/#/ systemd #/'
# Installing gshadow/systemd from libnss-systemd in position last
sed -E -i "${DPKG_ROOT}/etc/nsswitch.conf" -e '/^gshadow:\s[^#]*$/ s/$/ systemd/' -e '/^gshadow:\s.*#/ s/#/ systemd #/'
fi
rm "${DPKG_ROOT}/etc/nsswitch.conf.nss.${DPKG_MAINTSCRIPT_PACKAGE}-will-install"
fi
# End automatically added section
In my case there is match for the first two expressions but not for the last
two, however grep will still exit 0 in this case, so sed won't be called.
I found a related dh-nss bug #1113745, but it was marked as wontfix by the
dh-nss maintainer.
--
Dmitry Shachnev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/pkg-gnome-maintainers/attachments/20250928/df51fdc6/attachment.sig>
More information about the pkg-gnome-maintainers
mailing list