useradd: use built-in settings by default

Avoids installing inconsistent settings. The correct ones would be
written as soon as an admin uses useradd -D to modify the defaults.
This commit is contained in:
Ludwig Nussel 2020-12-03 18:05:59 +01:00
parent 599cc003da
commit bbf4b79bc4
3 changed files with 4 additions and 13 deletions

View File

@ -4,8 +4,7 @@
sysconf_DATA = login.defs sysconf_DATA = login.defs
defaultdir = $(sysconfdir)/default defaultdir = $(sysconfdir)/default
default_DATA = \ default_DATA =
useradd
nonpam_files = \ nonpam_files = \
limits \ limits \

View File

@ -1,8 +0,0 @@
# useradd defaults file
GROUP=1000
HOME=/home
INACTIVE=-1
EXPIRE=
SHELL=/bin/bash
SKEL=/etc/skel
CREATE_MAIL_SPOOL=yes

View File

@ -97,12 +97,12 @@ const char *Prog;
/* /*
* These defaults are used if there is no defaults file. * These defaults are used if there is no defaults file.
*/ */
static gid_t def_group = 100; static gid_t def_group = 1000;
static const char *def_gname = "other"; static const char *def_gname = "other";
static const char *def_home = "/home"; static const char *def_home = "/home";
static const char *def_shell = ""; static const char *def_shell = "/bin/bash";
static const char *def_template = SKEL_DIR; static const char *def_template = SKEL_DIR;
static const char *def_create_mail_spool = "no"; static const char *def_create_mail_spool = "yes";
static long def_inactive = -1; static long def_inactive = -1;
static const char *def_expire = ""; static const char *def_expire = "";