FS#58262 - [linux-hardened][shadow][glibc] gpasswd: nscd did not terminate normally (signal 11)
Attached to Project:
Arch Linux
Opened by Curtis Lee Bolin (curtisleebolin) - Wednesday, 18 April 2018, 21:57 GMT
Last edited by freswa (frederik) - Thursday, 28 September 2023, 13:30 GMT
Opened by Curtis Lee Bolin (curtisleebolin) - Wednesday, 18 April 2018, 21:57 GMT
Last edited by freswa (frederik) - Thursday, 28 September 2023, 13:30 GMT
|
Details
Description:
gpasswd fails to add user to group. Additional info: * package versions: * core/shadow 4.5-4 * usr/bin/gpasswd * core/glibc 2.26-11 * usr/bin/nscd Steps to reproduce: $ sudo gpasswd -a lee kvm Adding user lee to group kvm gpasswd: nscd did not terminate normally (signal 11) gpasswd: nscd did not terminate normally (signal 11) gpasswd: nscd did not terminate normally (signal 11) Thankfully usermod worked $ sudo usermod -a -G kvm lee |
This task depends upon
Closed by freswa (frederik)
Thursday, 28 September 2023, 13:30 GMT
Reason for closing: Fixed
Additional comments about closing: nscd removed in glibc-2.38-4
Thursday, 28 September 2023, 13:30 GMT
Reason for closing: Fixed
Additional comments about closing: nscd removed in glibc-2.38-4
$ sudo useradd testuser
$ grep testuser /etc/group
testuser:x:1003:
$ sudo gpasswd -a testuser kvm
Adding user testuser to group kvm
gpasswd: nscd did not terminate normally (signal 11)
gpasswd: nscd did not terminate normally (signal 11)
gpasswd: nscd did not terminate normally (signal 11)
$ grep testuser /etc/group
kvm:x:78:testuser
testuser:x:1003:
passwd: nscd did not terminate normally (signal 11)
Package versions:
* core/shadow 4.8.1-4
* usr/bin/passwd
* core/glibc 2.32-5
* usr/bin/nscd
Steps to reproduce:
1. Install Arch Linux (including sudo package) from latest installation image (2021.02.01);
2. Login as root;
3. % useradd -m someuser && passwd someuser && echo 'someuser ALL=(ALL) ALL' > /etc/sudoers.d/01_something && chmod 400 /etc/sudoers.d/01_something
4. Login as someuser;
5. $ sudo passwd -l root
passwd: nscd did not terminate normally (signal 11)
passwd: nscd did not terminate normally (signal 11)
passwd: nscd did not terminate normally (signal 11)
passwd: nscd did not terminate normally (signal 11)
Passwd: password expiry information changed.
6. $ logout
After these actions, I can no longer login as a user (and as root). I added a new user using arch-chroot, but he can't login too.
Then I reinstalled the system and repeated the same steps with the same result. Complete lockdown of all.
How do I unblock everyone/someone? I don't want to reinstall the system again.
$ sudo passwd -l root
passwd: nscd did not terminate normally (signal 11)
passwd: nscd did not terminate normally (signal 11)
passwd: nscd did not terminate normally (signal 11)
passwd: nscd did not terminate normally (signal 11)
Passwd: password expiry information changed.
But I was able to log in. That's progress! :)
nscd is a separate package in Debian (https://packages.debian.org/sid/nscd).
From the package description: "You should install this package only if you use slow services like LDAP, NIS or NIS+".
Is it possible and necessary to separate glibc and nscd in Arch Linux?
AFAICT nscd is not enabled by default in Arch. Did you manually enable it? Please show the output of:
systemctl status nscd
FWIW, Fedora are actively deprecating nscd (then planning to remove it entirely) [1]
[1]: https://fedoraproject.org/wiki/Changes/RemoveNSCD
$ systemctl status nscd
● nscd.service - Name Service Cache Daemon
Loaded: loaded (/usr/lib/systemd/system/nscd.service; disabled; vendor preset: disabled)
Active: inactive (dead)
journalctl doesn't say anything about nscd.
Fedora is already using sssd by default.
Debian does not use nscd and sssd (these packages are not installed) by default.
I don't know how it works in Debian yet.
passwd: nscd did not terminate normally (signal 11)
passwd: nscd did not terminate normally (signal 11)
passwd: nscd did not terminate normally (signal 11)
passwd: nscd did not terminate normally (signal 11)
passwd: password changed.
# pacman -Q glibc
glibc 2.36-6
However, this does not seem to be a problem for passwd in regards to changing/removing the password. The return code is still 0.
It's probably worth reporting this upstream.
As I am personally not using nscd, I don't really know though whether there is a use-case we should be aware of before doing so.
$ sudo passwd -l root
passwd: nscd did not terminate normally (signal 11)
passwd: nscd did not terminate normally (signal 11)
passwd: nscd did not terminate normally (signal 11)
passwd: nscd did not terminate normally (signal 11)
passwd: password changed.