Bug 5449

Summary: passwd -u does not properly undo a passwd -l
Product: [Retired] Red Hat Linux Reporter: fossum
Component: passwdAssignee: Cristian Gafton <gafton>
Status: CLOSED RAWHIDE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 6.0CC: fossum, ifettich
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
URL: http://www.cs.uwp.edu/staff/fossum
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2000-02-16 14:38:42 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 fossum 1999-09-30 03:01:03 UTC
For normal (I haven't tried MD5) password encryption, passwd
-l prepends a bang (!) to the encrypted password entry in
/etc/shadow, which effectively "locks" the password.  But
passwd -u fails to get back the original password for one
that is locked -- rather, in addition to removing the bang,
it adds an extra character at the end of the encrypted
password, rendering it unusable.

Comment 1 maavl 1999-11-23 13:34:59 UTC
This bug is  duplicated as #6083.

Comment 2 Bill Nottingham 2000-02-05 20:18:59 UTC
*** Bug 6083 has been marked as a duplicate of this bug. ***

Comment 3 Iosif Fettich 2000-02-06 17:54:59 UTC
The bug occurs _only_ if, while the given account was locked,
the user with the locked account tries to change his password.
What he usually does ... ;)
Afterwards, unlocking the password - no error message -
followed by an 'passwd -S user' will report 'no password set',
but the user will stay locked out with a bad shadow entry till an mercyful root
will change user's password.

Maybe this will help to solve the issue ?

Comment 4 Iosif Fettich 2000-02-07 09:24:59 UTC
Additional info;
no, it isn't related to trying to change the password, sorry. Here a typical
sequence to reproduce the error:

[root@teddy /quantum]# grep pppcicu /etc/shadow
pppcicu:I0mddrVwXE5zQ:10994:0:99999:15:10:-1:134537660
[root@teddy /quantum]# passwd -l pppcicu
Changing password for user pppcicu
Locking password for user pppcicu
passwd: Success
[root@teddy /quantum]# grep pppcicu /etc/shadow
pppcicu:!I0mddrVwXE5zQ:10994:0:99999:15:10:-1:134530044
[root@teddy /quantum]# passwd -u pppcicu
Changing password for user pppcicu
Unlocking password for user pppcicu
passwd: Success
[root@teddy /quantum]# grep pppcicu /etc/shadow
pppcicu:I0mddrVwXE5zQncz:/ww:10994:0:99999:15:10:-1:134530044
[root@teddy /quantum]#

A new field showed up in /etc/shadow.
Deleting it will make the account usable.
Maybe further environment data is needed ?

Comment 5 Bernhard Rosenkraenzer 2000-02-16 14:38:59 UTC
Fixed in 6.2.