Comment 19 for bug 523896

Revision history for this message
Steve Langasek (vorlon) wrote : Re: [Bug 523896] Re: useradd: cannot lock /etc/passwd; try again later.

On Sat, Aug 06, 2011 at 08:43:29AM -0000, Nicolas François wrote:
> I'm not really worried by the consistency of single files (each one are
> updated atomically).

> The problem is the inconsistency between files (e.g. /etc/passwd and
> /etc/shadow). I'm not sure what would be the worst case if for example
> /etc/passwd is updated but /etc/shadow is not.

I think the absolute worse case would be an account locked out because
/etc/passwd has been updated with an 'x' but the corresponding entry has not
been added to /etc/shadow. But a) that can be guarded against by changing
the files in the proper order (which is probably already being done), and b)
having lock files left behind doesn't help solve any of the resulting
problems.

Otherwise, I don't see any real possibility of breakage caused by having one
file updated without the other.

--
Steve Langasek Give me a lever long enough and a Free OS
Debian Developer to set it on, and I can move the world.
Ubuntu Developer http://www.debian.org/
<email address hidden> <email address hidden>