You might find it useful to set the default password expiry data in login.defs, but you probably won't find it too useful to configure the useradd configuration file. Really, what are the chances that you'll want to create all user accounts with the same account expiration date? Setting password expiry data in login.defs is more useful because you'll just be saying that you want new passwords to expire within a certain number of days, rather than to have them all expire on a specific date.
Most likely, you'll want to set account expiry data on a per-account basis, depending on whether you know that the accounts will no longer be needed as of a specific date. There are three ways that you can do this:
- Use useradd with the appropriate option switches to set expiry data as you create the accounts...