Adjusting password policies145
Retype new password:passwd: all authentication tokens updated successfully.[root@rhel-instance
]# grep usertest /etc/shadowusertest:$6$4PEVPj7M4GD8CH.4$VqiYY.IXetwZA/g54bFP1ZJwQ/yc6bnaFauHGA1 1eFzsGh/uFbJwxZCQTFHIASuamBz.27gb4ZpywwOA840eI.:19062:0:99999:7:::The password hash is created and the date for the last change is just kept the same as the current date. Lets establish some options:
[root@rhel-instance
]# chage --mindays 0 --warndays 7 --inactive 3 --expiredate 2030-01-01 usertest[root@rhel-instance
]# grep usertest /etc/shadowusertest:$6$4PEVPj7M4GD8CH.4$VqiYY.IXetwZA/g54bFP1ZJwQ/yc6bnaFauHGA1 1eFzsGh/uFbJwxZCQTFHIASuamBz.27gb4ZpywwOA 840eI.:19062:0:99999:7:3:21915:[root@rhel-instance
]# dated UTC + 21915 days'Tue Jan 1 01:00:00 AM CET 2030Please notice the changes in the /etc/shadow file corresponding to the values specified for chage. We can check the changes with the l option for chage:
[root@rhel-instance
]# chage -l usertestLast password change : mar 11, 2022Password expires : neverPassword inactive : neverShare with your friends: