To see all the password-related information of a user account, you can use the chage
command followed by the -l
flag (list flag) and then the user
account name in the Linux terminal.
# See all password related
# information of user account
chage -l <USERNAME_HERE>
For example, suppose we have a user account called john
and we can view all the password related information for the user using the chage
command like this,
# See all password related
# information of user account
chage -l john
The command shows the information on :
- Last password change date
- Password expiry date
- Password inactive date
- Account expiry date
- Minimum number of days between password change
- Maximum number of days between password change
- Number of days of warning before password expires
The output of the above command may look like this,
# OUTPUT
Last password change : Aug 28, 2021
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
Try executing the above commands live on this online Linux terminal.
That's all 😃!