1、Linux中查询密码有效截至日期:
[root@localhost ~]# chage -l root
Last password change : Dec 27, 2023 --最近一次修改密码的时间
Password expires : Mar 26, 2024 --密码过期时间
Password inactive : Mar 26, 2024 --密码失效时间
Account expires : never --账户过期时间
Minimum number of days between password change : 0 --两次改变密码之间相距最小天数
Maximum number of days between password change : 90 --两次密码改变密码相距最大天数
Number of days of warning before password expires : 7 --密码过期前开始警告的天数
2、修改密码
passwd root