Bug 47861

Summary: passwd reports success even after failure
Product: [Retired] Red Hat Linux Reporter: strovato
Component: passwdAssignee: Tomas Mraz <tmraz>
Status: CLOSED CURRENTRELEASE QA Contact: Aaron Brown <abrown>
Severity: high Docs Contact:
Priority: medium    
Version: 6.0   
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-03-24 18:38:43 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description strovato 2001-07-08 03:56:57 UTC
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

How reproducible:
Always

Steps to Reproduce:
1. touch /etc/shadow.lock
2. passwd anyuser

	

Actual Results:  passwd program reports "all authentication tokens updated 
successfully"

Expected Results:  passwd program should report an error if it can't get a 
lock on /etc/shadow

Additional info:

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.

Comment 1 strovato 2001-07-08 16:06:05 UTC
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...

Comment 2 Tomas Mraz 2005-03-24 18:38:43 UTC
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.