Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 5449 - passwd -u does not properly undo a passwd -l
passwd -u does not properly undo a passwd -l
Product: Red Hat Linux
Classification: Retired
Component: passwd (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Cristian Gafton
: 6083 (view as bug list)
Depends On:
  Show dependency treegraph
Reported: 1999-09-29 23:01 EDT by fossum
Modified: 2008-05-01 11:37 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2000-02-16 09:38:42 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description fossum 1999-09-29 23:01:03 EDT
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 08:34:59 EST
This bug is  duplicated as #6083.
Comment 2 Bill Nottingham 2000-02-05 15:18:59 EST
*** Bug 6083 has been marked as a duplicate of this bug. ***
Comment 3 Iosif Fettich 2000-02-06 12:54:59 EST
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 04:24:59 EST
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 09:38:59 EST
Fixed in 6.2.

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