Configuring default expiry data for useradd for Red Hat or CentOS only

The /etc/default/useradd file has the rest of the default settings. In this case, we'll look at the one from the CentOS machine:

Ubuntu also has the useradd configuration file, but it doesn't work. No matter how you configure it, the Ubuntu version of useradd just won't read it. So, the write-up about this file only applies to Red Hat or CentOS.
# useradd defaults fileGROUP=100HOME=/home INACTIVE=-1 EXPIRE= SHELL=/bin/bash SKEL=/etc/skel CREATE_MAIL_SPOOL=yes

The EXPIRE= line sets the default expiration date for new user accounts. By default, there is no default expiration date. INACTIVE=-1 means that user accounts won't be automatically locked out after the users' passwords ...

Get Mastering Linux Security and Hardening - Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.