How To Show Expiration Date of Linux User Account
A basic thing to do on flat file linux user account authentication is to identify its account expiration date. Most conventional linux setup makes use of flat file system authentication. This type of authentication makes use of /etc/passwd, and /etc/shadow files mainly, including the user group file /etc/group .
Here’s a real quick on how to show the expiration date of a particular linux user account.
Show Expiration Date of Linux User Account
Say, a linux user account named federer . To show its current expiration date, simply
# chage -l federer
Last password change                                   : Jun 25, 2008
Password expires                                       : Jun 25, 2009
Password inactive                                      : never
Account expires                                        : never
Minimum number of days between password change         : 0
Maximum number of days between password change         : 99999
Number of days of warning before password expires      : 7
From the above, the current expiration date of linux user account federer is June 25, 2009. If an account never expires, the right side of the above lines should display Never.
Change User Account Expiration Date
To change expiration date of system account, simply
# chage federer
And supply the account expiration date being asked. Alternatively, you can issue chage directly like so
# chage -E 08/15/2009 federer
Account Expiration Date Verification
# chage -l federer
Chage is a linux command that is short for change age. Chage linux binary is part of shadow-utils-4.1.1-1.fc9.i386 in Fedora 9.
All is done.

Article is so good