One of the things you may be required to set is a maximum password age.

This forces the user to reset their password when the timer expires.

Historically the advice was to reset passwords regularly, generally every 90 days.

Article image

This advice was designed to restrict the timeframe in which a potentially compromised password could be used.

This effect is so prevalent that it actually decreases overall security rather than providing the intended benefit.

this means you may still occasionally need to set a password expiry time.

Article image

The command will need to be run with sudo as it requires root permissions.

The command sets the number of days for which the specified users passwords will be valid before expiring.