Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 84629 - chage -E 0 does not unset the expiration date.
Summary: chage -E 0 does not unset the expiration date.
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: shadow-utils
Version: 8.0
Hardware: i686
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Eido Inoue
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-02-19 19:55 UTC by Nicholas Veeser
Modified: 2007-04-18 16:51 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2004-10-27 19:19:54 UTC


Attachments (Terms of Use)

Description Nicholas Veeser 2003-02-19 19:55:37 UTC
Description of problem:
chage -l <user> normally lists expiration date as "Never".
chage -E YYYY-MM-DD <user> changes this to the specified date.

I guessed (though not mentioned in the documentation) that
chage -E 0 <user>  would change the expiration date back to "Never".

After this change chage -l <user> again lists the expiration date as "Never". 

The shadow password entry, however, has changed from an empty field to a 0, and
the user cannot login.
The user cannot login.

It seems all other tools interpret the empty field as the state "Never" and a
'0' as Jan 1 1970.


chage should either not interpret a '0' as Never, or stop putting a 
'0' in the field when you really mean "Never".



Version-Release number of selected component (if applicable):
shadow-utils-20000902-12

How reproducible:
Every Time

Steps to Reproduce:
1. chage -l user
2. chage -E 2002-03-03 nicholas
3. su - nicholas
4. chage -E 0 nicholas
5. su - nicholas
6. chage -l nicholas
 
Actual results:
[root@visual log]# chage -E 2002-03-03 nicholas
[root@visual log]# su - nicholas
Your account has expired; please contact your system administrator
su: incorrect password
[root@visual log]# chage -E 0 nicholas
[root@visual log]# su - nicholas
Your account has expired; please contact your system administrator
su: incorrect password
[root@visual log]# chage -l nicholas
Minimum:        0
Maximum:        999999
Warning:        15
Inactive:       10
Last Change:            Feb 17, 2003
Password Expires:       Never
Password Inactive:      Never
Account Expires:        Never


Expected results:
[root@visual log]# chage -E 2002-03-03 nicholas
[root@visual log]# su - nicholas
Your account has expired; please contact your system administrator
su: incorrect password
[root@visual log]# chage -E 0 nicholas
[root@visual log]# su - nicholas
[nicholas@visual nicholas]$


Additional info:
None

Comment 1 redbugs 2003-08-25 17:50:33 UTC
Try changing it to -1 instead of zero.

Has anyone managed to get chage to work with LDAP?

I can't....

It seems like chage is not PAMified in RH 9, but I confess I haven't fully
explored this yet.  Certainly the PAM setup created by authconfig is grossly
incorrect, but I haven't completely solved that one yet either.

Comment 2 Eido Inoue 2004-10-27 19:19:54 UTC
Setting to "0" does not correspond to "Never", as the man pages says
that "The  expiredate  option is the number of days since January 1,
1970 on which the accounted is locked."


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