Bug 126709 (IT_45122_41789) - [PATCH]passwd.lock and group.lock file is never removed after using the command useradd
Summary: [PATCH]passwd.lock and group.lock file is never removed after using the comma...
Keywords:
Status: CLOSED ERRATA
Alias: IT_45122_41789
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: shadow-utils
Version: 3.0
Hardware: i686
OS: Linux
medium
low
Target Milestone: ---
Assignee: Eido Inoue
QA Contact:
URL:
Whiteboard:
: 21038 27004 (view as bug list)
Depends On:
Blocks: 123574 FC3BugWeekTracker
TreeView+ depends on / blocked
 
Reported: 2004-06-25 03:08 UTC by Franklin Abud
Modified: 2007-11-30 22:07 UTC (History)
5 users (show)

Fixed In Version: 4.0.3-29
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-12-13 20:57:10 UTC
Target Upstream Version:
Embargoed:


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 16:46 UTC, David Lehman
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2004:472 0 normal SHIPPED_LIVE Updated shadow-utils package 2004-12-20 05:00:00 UTC
Red Hat Product Errata RHBA-2004:527 0 normal SHIPPED_LIVE Updated shadow-utils package 2004-12-13 05:00:00 UTC

Description Franklin Abud 2004-06-25 03:08:20 UTC
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 13:40:45 UTC
shadow-utils version is shadow-utils-4.0.3-20

Comment 2 Chris Kloiber 2004-07-29 13:19:16 UTC
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 13:29:41 UTC
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 16:46:37 UTC
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-14 00:05:54 UTC
Just a little note: shadow.lock file is also never removed.

Comment 7 Rik van Riel 2004-09-26 20:39:18 UTC
*** Bug 21038 has been marked as a duplicate of this bug. ***

Comment 8 Rik van Riel 2004-09-26 20:46:38 UTC
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 20:57:22 UTC
*** Bug 27004 has been marked as a duplicate of this bug. ***

Comment 11 Jonathan Briggs 2004-09-27 21:33:40 UTC
Yay!  And it only took 4 years to get fixed. :-)

Comment 14 John Flanagan 2004-12-13 20:57:10 UTC
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-21 01:36:24 UTC
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.