Changes in shadow-utils password-expiration features
The shadow-utils project provides the tools that handle /etc/shadow, /etc/passwd, and other related databases; in general, it manages users and groups on many Linux systems. While most software releases are notable for what is added, the recent shadow-utils 4.20.0 release is most noteworthy for what has been removed. Specifically, several utilities and functionality related to periodic password expiry, which were deprecated in the December 2025 4.19.0 release, have been removed as planned. It is still possible to manage some aspects of password aging with shadow-utils, but organizations that depend on such features should start planning for their complete removal within a few years.
Some history
The shadow-utils project has its roots in the original Shadow Suite, written for SunOS in the 1980s, where /etc/shadow seems to have been invented. Password expiration wasn't supported as the old /etc/passwd database doesn't hold this information.
It's unclear when password-expiration features were added to the suite, but they are present in the first version committed to CVS in 1996. It seems likely they were added in the first version of the suite. Back then—and until very recently—it was common practice to periodically force password changes, as it was believed that it would decrease the risk of unauthorized access.
However, that belief no longer seems warranted. A paper
published in 2015, "Quantifying
the security advantage of password expiration policies" found that
the benefit of password expiry is "relatively minor at best, and
questionable in light of overall costs
".
In 2017, the US National Institute of Standards and Technology (NIST) published
an updated version (800-63B revision 3) of
its digital identity guidelines. Whether someone at NIST had read the paper is
unknown, but this revision recommended
against periodic password expiration. NIST published a FAQ in 2018 that explained
why it no longer recommended password expiration. If users know they will have
to change their passwords frequently, it said, "they often select a secret
that is similar to their old memorized secret by applying a set of common
transformations such as increasing a number in the password
". Thus, rotation
provided a false sense of security since attackers could likely predict how a
user might change their password.
In 2025, NIST published revision 4 of the publication, and strengthened the wording about periodic password expiration. This time, instead of recommending against password expiration, the policy prohibits it. Users are allowed to rotate passwords periodically, but the verifying software is not allowed to require this. The wording also changed from referring generically to arbitrary changes to specifically mentioning periodic changes.
Verifiers and CSPs SHALL NOT require subscribers to change passwords periodically. However, verifiers SHALL force a change if there is evidence that the authenticator has been compromised.
The changes in shadow-utils 4.20.0 move the project closer to today's best practices for password management by disabling some features that force password changes. The expiry command, which checks and enforces password-expiration policy, has been removed. This is a first step in shadow-utils deprecating and removing password-expiration features, and expiry was redundant with other programs as well. For example, it is possible to use getent to retrieve information about a user's password-expiration settings. A password can be expired immediately using passwd -e, which will force the user to reset the password on the next login.
The fourth field of /etc/shadow, which specifies the minimum number of days until a user can change a password, is now ignored and removed if present. There is no longer a minimum password age; it was a security vulnerability in some cases, and also part of deprecating and removing password-expiration features. It is a security vulnerability because it may have prevented users from changing their password immediately, which may be necessary if a user's password is compromised in some fashion.
Other changes
The groupmems command, which allowed users to administer the members of their own group, has been removed. Its functionality overlapped with the more powerful usermod command for root; since groupmems was not being installed as setuid root by distributions, it was useless for non-root users.
Support for the Data Encryption Standard (DES) and MD5 password-hashing algorithms has been removed, as they are insecure compared to more modern hashing algorithms. The default is now SHA512 if ENCRYPT_METHOD is not defined in the login.defs configuration file. However, other programs and libraries (such as libpam) also read this configuration file, and may still default to unsafe algorithms such as DES, so users should continue defining this variable explicitly, at least for some years.
The logoutd utility has been dropped. It was used to enforce login time and port restrictions as specified in the /etc/porttime configuration file. If that filename does not ring a bell, it is likely because it has not been used in some time; it is not mentioned in the Filesystem Hierarchy Standard's description of /etc, and none of the major Linux distributions package the logoutd utility these days—so it made sense to remove it from shadow-utils.
Outdated policies and workarounds
Some outdated policies still require password expiration. These policies, which are even required by some countries, are unfortunate. Some users we've spoken to are required by contract to expire their passwords, and shadow-utils must support them (or we'd force them to fork the programs, or worse).
While researching whether shadow-utils could remove password expiration, the maintainers found that Spain's National Intelligence Centre (CNI) has a policy requiring expiration, and it provides scripts using chage—among other programs—that set up systems to comply with its policies. These scripts are public, and are meant to be used by companies that must follow its policies. The maintainers of shadow-utils tried to contact CNI, but have not received an answer.
Several features related to password aging still remain in shadow-utils, but are deprecated and will be removed at a later date. For example, chage is still included, but several of its options for setting minimum password age have been removed and others are deprecated. The passwd, useradd, and usermod options related to aging of passwords are also deprecated.
Some fields of /etc/shadow cannot be removed yet, as explained above, as they are required by some policies and countries. However, they are deprecated, and will be removed eventually. This includes the third (date of last password change), fifth (maximum password age), sixth (password warning period), and seventh (password inactivity period) fields of /etc/shadow, and also the command options that handle these fields.
Users will not be able to enforce a minimum password age in shadow-utils 4.20.0 anymore, and there's no workaround for that. It is expected that the deprecated features will be supported for at least a few years, but organizations that have policies requiring unnecessary periodic password changes should plan to phase them out. It is our hope that removing these features will encourage better password policies and improve security.
[ Alejandro is one of the maintainers of the shadow-utils project. ]
| Index entries for this article | |
|---|---|
| GuestArticles | Colomar, Alejandro |
