• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
sharadchhetri

sharadchhetri

Tutorials On Linux, Unix & Open Source

  • Home
  • Linux Commands
  • Resources
    • Learn Linux
  • My WordPress plugins

How to show user account password expiration detail on Linux

March 31, 2014 by Sharad Chhetri Leave a Comment

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

Share this:

  • Twitter
  • Facebook
  • More
  • Print
  • Email
  • LinkedIn
  • Reddit
  • Tumblr
  • Pinterest
  • Pocket
  • Telegram
  • WhatsApp
  • Mastodon

Related posts:

  1. How to lock and unlock user account in linux
  2. Linux: Set user password by using encrypted password in command
  3. create a system account below uid 500 on RHEL/CentOS/Scientific Linux
  4. Force linux user to change password upon login
  5. How to show line numbers with less command in Linux
  6. grep command to show lines after and before the keyword
  7. How to delete password of user in Linux
  8. How to increase Password Expire date without resetting the password
  9. How to set user postgres password in postgresql 9.1
  10. Password prompt in single user mode is not secure : CentOS/Red Hat

Filed Under: Linux, Linux Commands Tagged With: chage, linux command

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

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

Primary Sidebar

Our Social Media Presence

  • Facebook
  • GitHub
  • Twitter

Linux Command

What is Linux Internal And External Command

Linux Basic Commands With Examples For Every Beginner

tr command to convert lines to space , tab and vertical tab

smbpasswd command not found on CentOS 7 and RHEL 7

Solution : semanage command not found

Unix / Linux : How to print duplicate lines from file

More Posts from this Category

You Might Like These Articles!

simplecodesyntax wordpress plugin

SimpleCodeSyntax : My Another WordPress Plugin

Install Nginx

How To Install Nginx On Ubuntu 22.04 LTS

Install Latest Git package in Ubuntu Operating System

How To Always Install Latest Git Package In Ubuntu Operating System

Bash script for installing VirtualBox on Ubuntu 22.04 LTS Desktop

Install VirtualBox On Ubuntu 22.04 LTS Desktop (Bash Script)

libfuse

dlopen(): error loading libfuse.so.2 – Got Error On Ubuntu

Failed to open/create the internal network

VirtualBox Error: Failed to open/create the internal network

Always Useful Tips And Tricks

How to set JAVA environment variables in Linux

linux release renew dhcp assigned ip address

How to hide php version information in header

Convert hyphen to underscore in between all filenames shell script

send email after mysql backup through bash script in simple way

How to convert float to integer number

configure: error: C++ compiler cannot create executables

Explore 90+ Article On "Linux Tips And Tricks"

Copyright © 2023 ยท
The material in this site cannot be republished either online or offline, without our permission.
Proudly Blogging From Bharat.

  • Contact
  • About Me
  • My WordPress plugins
  • Privacy Policy