From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows 98)
Description of problem:
passwd reports "authentication tokens updated successfully" even though
shadow file is locked and no changes are made
Steps to Reproduce:
1. touch /etc/shadow.lock
2. passwd anyuser
Actual Results: passwd program reports "all authentication tokens updated
Expected Results: passwd program should report an error if it can't get a
lock on /etc/shadow
I'm using Redhat 6.0, however I have tried upgrading PAM, pwdb, passwd,
and shadow-utils to 6.2 levels. No effect on this problem.
Additionally, touching "/etc/passwd.lock" instead of "/etc/shadow.lock" will
cause passwd to report failure - even though it succeeded! Exactly the reverse
of the first problem...
This doesn't apply to the current Fedora/RHEL distributions the passwd locking
is done using lckpwdf function which uses /etc/.pwd.lock file and it should
handle the locking correctly.