Change the Password Warning Period [chage -W 5 username] in Fedora Linux

Change the Password Warning Period [chage -W 5 username] in Fedora Linux

Fedora like other Linux-based distros has a standard shadow file that stores information about users’ accounts and passwords, /etc/shadow. Using the command chage -W “X” user changes the period before the set password expiry date, which a user will be warned to change their password.

chage --help

chage” is short for Change Age, and is a command used to view and change password expiry information.

grep user /etc/shadow

“grep user /etc/shadow” displays the specific user’s password information. The information is displayed in one line with different fields separated by colons.

The information from the command above is organized as;

Username:EncryptedPassword:LastPasswordChange:MinimumPasswordAge:MaximumPasswordAge:WarningPeriod

If you wanted to change the “WarningPeriod” field to 5 days before the password expires, you would run the following command:

chage -W 5 username

 

Change the Password Warning Period [chage -W 5 username] in Fedora Linux
Linux | thetqweb