BM Balmiki Mandal 04 May 2023 2 views 0 comments Linux

How to Use the “Change” Command in Linux

Using the Linux chage Command

The chage command is a powerful Linux tool used to change and manage user password aging information. It can be used to set expiration dates on user accounts, configure password expiration warnings and more. In this article, we’ll go over how to use the chage command and explain some of its most useful options.

Basic Syntax of the chage Command

The basic syntax for the chage command is as follows:

chage [option] [username] 

For example, to view the currently configured password aging information for a user named “bob”, you could run the command:

chage -l bob

Common Options for the chage Command

There are a number of different options that can be used with the chage command. Here are some of the most common ones:

  • -d, --lastday: This option sets the date of the user’s last password change.
  • -E, --expiredate: This option sets the date on which the user’s password will expire.
  • -M, --mindays: This option sets the minimum number of days between password changes.
  • -W, --warndays: This option sets the number of days prior to the password expiry when the user should receive warnings.

For more options and usage examples, check out the official man page.

Conclusion

In this article, we explained how to use the chage command on a Linux system. We covered some of the command’s most common options and showed how to use them to manage user password aging information. Be sure to check out the official man page for more details and usage examples.

0 Comments

No comments yet, Be the first to comment.

Post a Comment

Please sign in to post a comment.

Related Posts

How to Create an Embedded Linux Development Environment on Windows Using WSL2

 Creating an Embedded Linux Development Environment on Windows Using WSL2If you are learning Embedded Linux, y...

AG Anvesh G 05 Sep 2026
Installing Ubuntu OS in Window Using VirtualBox

Installing Ubuntu on Windows Using VirtualBoxSteps:-1. Download and Install VirtualBox Download VirtualBox fr...

BM Balmiki Mandal 18 Jan 2025
Kali Linux 2021.4, Apple M1 support, armhf, arm64, Electro4u

Kali Linux 2021.4 Brings Improved Apple M1 Support Kali Linux, the world’s premier open-source penetration te...

BM Balmiki Mandal 06 Jun 2023