Comment 16 for bug 432964

Revision history for this message
David Henningsson (diwic) wrote : Re: usermod fails: "cannot lock /etc/passwd"

I have also encountered this bug and tried to nail it down. It seems like the following files have been left:

/etc/passwd.lock
/etc/passwd+
/etc/shadow.lock

I renamed these files and now I can successfully create users again.

Out of curiosity, I checked what was in the passwd+ file, the result was:

< guest:x:115:123:Guest,,,:/:/bin/bash
---
> guest:x:115:123:Guest,,,:/tmp/guest-home.t4xKqt:/bin/bash

...it seems like this was left from a (crashed/hung?) attempt to make a guest session.