Wednesday, September 3, 2014

[QuickTips] : How to show user account password expiration detail on Linux

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:
Example: In this example,we will view the account aging information of user called sharad
For more information read the manual page of chage by running the command man chage

No comments: