How to show user account password expiration detail on Linux

The post is about to show account aging information.To get details of user account password expiration ,we use the command chage.
With chage command use the option -l or --list.

The chage program requires a shadow password file to be available.The absolute path of shadow file is /etc/shadow.It is notable that /etc/shadow file has password information in encrypted format. In other words, chage command helps to get information from /etc/shadow file.

Note: chage command is also used for setting account and password expiration date-time.For setting these information,the user should be root or privileged user.
Only -l is the option which can also be used by unprivileged user.

Syntax:

chage -l User-Name

Example: In this example,we will view the account aging information of user called sharad

[root@localhost ~]# chage -l sharad
Last password change					: Mar 27, 2014
Password expires					: never
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
[root@localhost ~]# 

For more information read the manual page of chage by running the command man chage

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.