Description of problem: chage 命令设置超时时间显示异常 Version-Release number of selected component (if applicable): [root@iZbp14ub0x084rkaiux0krZ test-results]# cat /etc/os-release NAME="Anolis OS" VERSION="23" ID="anolis" VERSION_ID="23" PLATFORM_ID="platform:an23" PRETTY_NAME="Anolis OS 23" ANSI_COLOR="0;31" HOME_URL="https://openanolis.cn/" BUG_REPORT_URL="https://bugzilla.openanolis.cn/" [root@iZbp14ub0x084rkaiux0krZ test-results]# uname -a Linux iZbp14ub0x084rkaiux0krZ 5.10.134-12.1.an23.x86_64 #1 SMP Thu Oct 13 11:38:24 CST 2022 x86_64 GNU/Linux How reproducible: [root@iZbp14ub0x084rkaiux0krZ test-results]# useradd tldr-user [root@iZbp14ub0x084rkaiux0krZ test-results]# chage --expiredate 2022-11-11 tldr-user [root@iZbp14ub0x084rkaiux0krZ test-results]# chage -l tldr-user Last password change : %b %d, %Y Password expires : never Password inactive : never Account expires : %b %d, %Y Minimum number of days between password change : 0 Maximum number of days between password change : 99999 Number of days of warning before password expires : 7 Steps to Reproduce: 同上 Actual results: Last password change和Account expires显示异常 Expected results: 显示正确的时间 Additional info: anolis23 4月份的镜像正常显示: [root@iZbp12nj7zzd2hcr70xlilZ ~]# useradd tldr-user [root@iZbp12nj7zzd2hcr70xlilZ ~]# chage --expiredate 2022-11-11 tldr-user [root@iZbp12nj7zzd2hcr70xlilZ ~]# chage -l tldr-user Last password change : Oct 28, 2022 Password expires : never Password inactive : never Account expires : Nov 11, 2022 Minimum number of days between password change : 0 Maximum number of days between password change : 99999 Number of days of warning before password expires : 7 [root@iZbp12nj7zzd2hcr70xlilZ ~]# userdel -r tldr-user [root@iZbp12nj7zzd2hcr70xlilZ ~]# uname -a Linux iZbp12nj7zzd2hcr70xlilZ 5.17.0-1.an23.x86_64 #1 SMP PREEMPT Tue Apr 12 16:43:09 CST 2022 x86_64 GNU/Linux [root@iZbp12nj7zzd2hcr70xlilZ ~]#
社区已有issue:https://github.com/shadow-maint/shadow/issues/564
在shadow-utils-4.12.3-3.an23版本修复
[root@localhost anuser]# useradd tldr-user [root@localhost anuser]# chage --expiredate 2022-11-11 tldr-user [root@localhost anuser]# chage -l tldr-user Last password change : Nov 01, 2022 Password expires : never Password inactive : never Account expires : Nov 11, 2022 Minimum number of days between password change : 0 Maximum number of days between password change : 99999 Number of days of warning before password expires : 7 [root@localhost anuser]# uname -a Linux localhost.localdomain 5.10.134-12.1.an23.x86_64 #1 SMP Thu Oct 13 11:38:24 CST 2022 x86_64 GNU/Linux [root@localhost anuser]#