Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 125421

Summary: nscd not HUP'd on user/group operations
Product: [Fedora] Fedora Reporter: Ville Skyttä <scop>
Component: shadow-utilsAssignee: Eido Inoue <havill>
Status: CLOSED RAWHIDE QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: 2CC: alan, anvil, mattdm, oliver
Target Milestone: ---Keywords: EasyFix, Patch
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 2:4.0.3-31 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-10-12 20:01:06 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 123268, 125270    

Description Ville Skyttä 2004-06-06 19:11:34 UTC
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 18:15:37 UTC
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 21:31:11 UTC
*** Bug 123092 has been marked as a duplicate of this bug. ***

Comment 3 Ville Skyttä 2004-07-02 17:27:35 UTC
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 19:38:09 UTC
Fix committed to CVS


Comment 5 Ville Skyttä 2004-08-09 17:03:09 UTC
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 13:56:46 UTC
(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 18:47:15 UTC
Alternatively, it can call nscd -i '<whatever>' to invalidate the
proper cache.

Comment 8 Boris Folgmann 2004-08-25 17:27:48 UTC
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 20:11:27 UTC
*** Bug 124831 has been marked as a duplicate of this bug. ***

Comment 10 Matthew Miller 2004-10-12 20:13:53 UTC
Will there be an update released? Thanks!

Comment 11 Ville Skyttä 2004-12-10 17:53:16 UTC
Thanks for the FC2 update.

Comment 12 Oliver Falk 2005-05-21 07:42:43 UTC
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 08:16:55 UTC
Indeed, this issue seems to have resurfaced in FC4t3, but apparently the root
cause is something else this time.  Bug 134323 has more info.