[root@zhangguokui ~]# echo "1234567"| passwd --stdin oldboy
Changing password for user oldboy.
passwd: all authentication tokens updated successfully.
[root@zhangguokui ~]# passwd -n 8 -x 61 -w 11 -i 31 oldboy
Adjusting aging data for user oldboy.
passwd: Success
[root@zhangguokui ~]# chage -l oldboy
Last password change : Jan 21, 2020
Password expires : Mar 22, 2020
Password inactive : Apr 22, 2020
Account expires : never
Minimum number of days between password change : 8
Maximum number of days between password change : 61
Number of days of warning before password expires : 11
[root@zhangguokui ~] # chage -m 7 -M 60 -W 10 -I 30 oldboy
[root@zhangguokui ~]# chage -l oldboy
Last password change : Jan 21, 2020
Password expires : Mar 21, 2020
Password inactive : Apr 20, 2020
Account expires : never
Minimum number of days between password change : 7
Maximum number of days between password change : 60
Number of days of warning before password expires : 10