Package: shadow
Version: 1:4.12.3+dfsg1-1
TL;DR https://github.com/shadow-maint/shadow/issues/564
After the shadow update 1:4.11.1+dfsg1-2 -> 1:4.12.3+dfsg1-1, usermod or
chage is unable to set an account expiration date, /etc/shadow is
changed succsesfully. Reproducer:
useradd scruffy -s /bin/bash -c scruffy
echo scruffy:foobar | chpasswd
root@debian:~# grep scruffy /etc/shadow
scruffy:$y$j9T$1fstz5tURDw3e6S.opJnI.$9vHoS3GogDEiw.aT.hc/6fXsDaJKpFucIBP3RaNeVV0:19278:0:99999:7:::
root@debian:~# chage -l scruffy
Last password change : %b %d, %Y
Password expires : never
Password inactive : never
Account expires : %b %d, %Y
root@debian:~# usermod -e 2022-11-12 scruffy
root@debian:~# chage -l scruffy
Last password change : %b %d, %Y
Password expires : never
Password inactive : never
Account expires : %b %d, %Y
root@debian:~# grep scruffy /etc/shadow
scruffy:$y$j9T$1fstz5tURDw3e6S.opJnI.$9vHoS3GogDEiw.aT.hc/6fXsDaJKpFucIBP3RaNeVV0:19278:0:99999:7::19308:
The last second last field contains the account expiration date "19308".
On Debian stable this works:
root@debian:~# chage -l scruffy
Last password change : Oct 13, 2022
Password expires : never
Password inactive : never
Account expires : never
root@debian:~# usermod -e 2022-11-12 scruffy
root@debian:~# chage -l scruffy
Last password change : Oct 13, 2022
Password expires : never
Password inactive : never
Account expires : Nov 12, 2022
root@debian:~# grep scruffy /etc/shadow
scruffy:$y$j9T$dNsOFo7bJ.ptWQnpVg/MO.$xMnvSP2uVI.JpoKa2.PsveCvjKmDi24Fq1QaUg45L9A:19278:0:99999:7::19308:
This seems to have fixed upstream:
https://github.com/shadow-maint/shadow/issues/564
In commit
https://github.com/shadow-maint/shadow/commit/e503fd574b7dbf6b21b1168e20938f0922807916
_______________________________________________
Pkg-shadow-devel mailing list
[email protected]
https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/pkg-shadow-devel