The chage command

Another interesting aspect regarding user accounts involves the aging time for a password; the expiration for a password. We can view the expiration for a given user by using the chage command. Let's create a password for the user tom and then check the password aging settings for the new user:

You must have root privileges to change the password aging parameters.
root@ubuntu:/home/philip# passwd tomEnter new UNIX password:Retype new UNIX password:passwd: password updated successfullyroot@ubuntu:/home/philip#

Excellent! Based on the preceding output, we used the -l option to display the expiration settings; we can see some ...

Get CompTIA Linux+ Certification Guide now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.