Bug 125421 - nscd not HUP'd on user/group operations
nscd not HUP'd on user/group operations
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: shadow-utils (Show other bugs)
2
All Linux
high Severity high
: ---
: ---
Assigned To: Eido Inoue
: EasyFix, Patch
: 123092 124831 (view as bug list)
Depends On:
Blocks: FC3Target FC2Update
  Show dependency treegraph
 
Reported: 2004-06-06 15:11 EDT by Ville Skyttä
Modified: 2007-11-30 17:10 EST (History)
4 users (show)

See Also:
Fixed In Version: 2:4.0.3-31
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-10-12 16:01:06 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Ville Skyttä 2004-06-06 15:11:34 EDT
nscd is not properly HUP'd on user/group operations, resulting in
obscure problems when creating/removing users while it's running.

strace to the rescue: the nscd pid is looked from a wrong location, it
lives nowadays in /var/run/nscd/nscd.pid, not /var/run/nscd.pid.

This change to shadow-4.0.3-nscd.patch, around line 22, fixes it for
me (but please review, I'm not a C programmer):

  +  if ((pidfile=fopen("/var/run/nscd.pid","r")) != NULL)
  +  {

...to:

  +  if ((pidfile=fopen("/var/run/nscd/nscd.pid","r")) != NULL ||
  +      (pidfile=fopen("/var/run/nscd.pid","r")) != NULL)
  +  {


While at it: the libselinux-devel and gettext build dependencies are
missing from shadow-utils.
Comment 1 Ville Skyttä 2004-06-18 14:15:37 EDT
Ping?  It is very important to get this fixed as all packages that
create user accounts will be more or less broken at install time (bad
file permissions) if nscd is running.
Comment 2 Tom Lane 2004-06-19 17:31:11 EDT
*** Bug 123092 has been marked as a duplicate of this bug. ***
Comment 3 Ville Skyttä 2004-07-02 13:27:35 EDT
Ping?  Not only FC2 needs this fixed, but FC3 naturally as well (seems
to be broken in rawhide too).

Comments, please?
Comment 4 Alan Cox 2004-07-10 15:38:09 EDT
Fix committed to CVS
Comment 5 Ville Skyttä 2004-08-09 13:03:09 EDT
A FC2 erratum for this would be welcome... as IIRC suggested on
fedora-devel, reopening and hereby poking the package maintainer :)
Comment 6 Carwyn Edwards 2004-08-19 09:56:46 EDT
(Adding myself to CC list)

User accounts of this problem:

http://www.redhat.com/archives/fedora-devel-list/2004-August/msg00613.html

http://www.redhat.com/archives/fedora-list/2004-July/msg05437.html

I suspect some people that have installed packages that add users
while they have nscd running will have garbage in their /etc/passwd
/etc/group as a result of this (I did). This is possibly worth noting
in any errata notes.
Comment 7 Bill Nottingham 2004-08-19 14:47:15 EDT
Alternatively, it can call nscd -i '<whatever>' to invalidate the
proper cache.
Comment 8 Boris Folgmann 2004-08-25 13:27:48 EDT
This bug is really awful. Now I know what caused the trouble when
installing daemons on different servers. And I blamed the daemon RPMs
for that! Regularly the user/group for the daemon is missing,
resulting in not running server software.
It's really stupid, look here:
# groupadd -r test
# useradd -r -g test test
useradd: unknown group test

Please relase an update, I disabled nscd for now.
Comment 9 John Dennis 2004-08-30 16:11:27 EDT
*** Bug 124831 has been marked as a duplicate of this bug. ***
Comment 10 Matthew Miller 2004-10-12 16:13:53 EDT
Will there be an update released? Thanks!
Comment 11 Ville Skyttä 2004-12-10 12:53:16 EST
Thanks for the FC2 update.
Comment 12 Oliver Falk 2005-05-21 03:42:43 EDT
It still happens for me:

My versions:
glibc-2.3.5-6
nscd-2.3.5-6
shadow-utils-4.0.7-7

Example:
rpm -Uvh test-0.1-1.i386.rpm
Preparing...                ########################################### [100%]
   1:test                   warning: group test does not exist - using root3%)
########################################### [100%]
warning: group test does not exist - using root

rpm -qp --scripts test-0.1-1.i386.rpm
preinstall scriptlet (using /bin/sh):
groupadd -r test >/dev/null 2>&1
postuninstall scriptlet (using /bin/sh):
groupdel test >/dev/null 2>&1

Please also note, that another bug with the same problematic exists: bug 
#134323
Comment 13 Ville Skyttä 2005-05-21 04:16:55 EDT
Indeed, this issue seems to have resurfaced in FC4t3, but apparently the root
cause is something else this time.  Bug 134323 has more info.

Note You need to log in before you can comment on or make changes to this bug.