Bug 136369

Summary: passwd gives erroneous information
Product: Red Hat Enterprise Linux 3 Reporter: Francisco Jorge <franjorge>
Component: passwdAssignee: Tomas Mraz <tmraz>
Status: CLOSED DUPLICATE QA Contact: Jay Turner <jturner>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.0CC: srevivo
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-11-16 13:34:39 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 Francisco Jorge 2004-10-19 16:01:44 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET 
CLR 1.1.4322)

Description of problem:
If you change the attributes of 
the /etc/passwd, /etc/shadow, /etc/groups and /etc/gshadow this way:


chattr +i /etc/group
chattr +i /etc/gshadow
chattr +i /etc/shadow
chattr +i /etc/passwd

and then, as user root you try to change the password of another 
user, then the message you get is:

# passwd user
Changing password for user optenet.
New password: 
Retype new password: 
passwd: all authentication tokens updated successfully.

But the password remains unchanged, since the files necessary to 
change it are not accesible.

 

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1.chattr +i /etc/group
chattr +i /etc/gshadow
chattr +i /etc/shadow
chattr +i /etc/passwd

2.passwd user
Changing password for user optenet.
New password: 
Retype new password: 
passwd: all authentication tokens updated successfully.

3.Login as user with the new password fails.
    

Expected Results:  You should receive a message saying that the 
password cannot be changed due to the file attributes.

Additional info:

Comment 1 Jindrich Novy 2004-10-22 12:09:58 UTC
Hi Francisco,

the problem is not actually in passwd itself but the problem is in the
pam, which is called to modify user password. [particularly in
pam_unix_passwd.c, I doubt the function pam_sm_chauthok()] I'm
investigating this now.

Comment 2 Jindrich Novy 2004-11-16 13:33:06 UTC
Reassigning to pam maintainer.

Comment 3 Tomas Mraz 2004-11-16 13:34:18 UTC

*** This bug has been marked as a duplicate of 77646 ***