On RedHat 5.1, if you run vipw, and someone concurrently runs passwd, passwd will run and modify /etc/passwd even though /etc/ptmp exists. This condition would result in a loss of the password change (or multiple changes) that occurred while vipw was in operation. I spoke with "oot" on LinuxNET and he verified the bug, which apparently also exists in 5.2. He asked me to report this bug here.
Michael: Do you think we should add a quick check to passwd to look for the lockfile, and exit if it exists?
glibc vs. vipw locking difference passed on to Cristian to resolve
vipw can not lock the passwd file for an extended period of time. The locking mechanism has an algorithm that will make it avoid deadlocks from runaway processes (basically wait at most 10 sec before ignoring the lock and acquiring it for yourself) vipw will lock the database when it is updating it, checking that the timestamp was not modified in the meantime.