Bug 126709 - (IT_45122_41789) [PATCH]passwd.lock and group.lock file is never removed after using the command useradd
[PATCH]passwd.lock and group.lock file is never removed after using the comma...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: shadow-utils (Show other bugs)
3.0
i686 Linux
medium Severity low
: ---
: ---
Assigned To: Eido Inoue
:
: 21038 27004 (view as bug list)
Depends On:
Blocks: 123574 FC3BugWeekTracker
  Show dependency treegraph
 
Reported: 2004-06-24 23:08 EDT by Franklin Abud
Modified: 2007-11-30 17:07 EST (History)
5 users (show)

See Also:
Fixed In Version: 4.0.3-29
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2004-12-13 15:57:10 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Patch to shadow-utils-4.0.3-20 so useradd unlocks files when closing them and unlocks them on failure. (907 bytes, patch)
2004-07-29 12:46 EDT, David Lehman
no flags Details | Diff

  None (edit)
Description Franklin Abud 2004-06-24 23:08:20 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.2)
Gecko/20030208 Netscape/7.02

Description of problem:
after using the useradd command the lock files are never removed, The
problem occurs if you get another process that runs and has the same PID  
as the one stored in the lock files.  When this happens, useradd
refuses to add the user because it thinks that the running process has
locked the file. The customer has a lot automated useradd/deletes process.



Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1.useradd test
2. watch cat /etc/passwd.lock
3. useradd test1

    

Actual Results:  after the useradd command is done doing it's thing
the lock file should be removed

Expected Results:  the lock file remains


Additional info:

I'm still in the process of getting the version of shadow-utils they
are using.
Comment 1 Franklin Abud 2004-06-29 09:40:45 EDT
shadow-utils version is shadow-utils-4.0.3-20
Comment 2 Chris Kloiber 2004-07-29 09:19:16 EDT
Indeed the passwd.lock file is not being removed, but for some reason
it's existance is not interfering with normal useradd or passwd usage.
Subsequent runs of useradd do update the passwd.lock, and runs of
passwd don't seem to.
Comment 3 Chris Kloiber 2004-07-29 09:29:41 EDT
Oh, I see. It becomes a problem when another process reuses the PID,
and suddenly you can't use useradd. My Bad.
Comment 4 David Lehman 2004-07-29 12:46:37 EDT
Created attachment 102289 [details]
Patch to shadow-utils-4.0.3-20 so useradd unlocks files when closing them and unlocks them on failure.

I've verified this patch works on RHEL3AS-U2.
Comment 5 Marcin Garski 2004-08-13 20:05:54 EDT
Just a little note: shadow.lock file is also never removed.
Comment 7 Rik van Riel 2004-09-26 16:39:18 EDT
*** Bug 21038 has been marked as a duplicate of this bug. ***
Comment 8 Rik van Riel 2004-09-26 16:46:38 EDT
OK, so the patch has been tried by at least 3 of our support people.
I'll apply it to the rawhide RPM as part of the FC3 bug week effort.
Comment 9 Rik van Riel 2004-09-26 16:57:22 EDT
*** Bug 27004 has been marked as a duplicate of this bug. ***
Comment 11 Jonathan Briggs 2004-09-27 17:33:40 EDT
Yay!  And it only took 4 years to get fixed. :-)
Comment 14 John Flanagan 2004-12-13 15:57:10 EST
An errata has been issued which should help the problem 
described in this bug report. This report is therefore being 
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files, 
please follow the link below. You may reopen this bug report 
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2004-527.html
Comment 15 John Flanagan 2004-12-20 20:36:24 EST
An advisory has been issued which should help the problem 
described in this bug report. This report is therefore being 
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files, 
please follow the link below. You may reopen this bug report 
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2004-472.html

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