-
Notifications
You must be signed in to change notification settings - Fork 198
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
compose: remove lastchg values from [/usr]/etc/shadow
The format of /etc/shadow contains several fields relating to password aging. One of these, `lastchg`, contains a timestamp that represents the epoch day of the last password change. Tools that don't respect SOURCE_DATE_EPOCH, which includes systemd's `sysusers` tool, will set this to a value based on the current time of the build. This causes a lack of reproducibility. The `lastchg` field can be safely made empty. This disables the password aging features. This change rewrites /etc/shadow to remove all `lastchg` values. This removal could be made conditional on the entry containing an encrypted password field indicating that the account is either locked or otherwise restricted from using passwords, such as `*` or anything starting with `!`.
- Loading branch information
Showing
2 changed files
with
29 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters