Bug 5449 - passwd -u does not properly undo a passwd -l
Summary: passwd -u does not properly undo a passwd -l
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: passwd
Version: 6.0
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Cristian Gafton
QA Contact:
URL: http://www.cs.uwp.edu/staff/fossum
: 6083 (view as bug list)
Depends On:
TreeView+ depends on / blocked
Reported: 1999-09-30 03:01 UTC by fossum
Modified: 2008-05-01 15:37 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2000-02-16 14:38:42 UTC

Attachments (Terms of Use)

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
[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
[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
[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.

Note You need to log in before you can comment on or make changes to this bug.