From: Ludwig Nussel Date: Thu, 3 Dec 2020 17:05:59 +0000 (+0100) Subject: useradd: use built-in settings by default X-Git-Tag: v4.9~43^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F299%2Fhead;p=thirdparty%2Fshadow.git 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. --- diff --git a/etc/Makefile.am b/etc/Makefile.am index cc31c609d..c5c0620bf 100644 --- a/etc/Makefile.am +++ b/etc/Makefile.am @@ -4,8 +4,7 @@ sysconf_DATA = login.defs defaultdir = $(sysconfdir)/default -default_DATA = \ - useradd +default_DATA = nonpam_files = \ limits \ diff --git a/etc/useradd b/etc/useradd deleted file mode 100644 index b77dd8560..000000000 --- a/etc/useradd +++ /dev/null @@ -1,8 +0,0 @@ -# useradd defaults file -GROUP=1000 -HOME=/home -INACTIVE=-1 -EXPIRE= -SHELL=/bin/bash -SKEL=/etc/skel -CREATE_MAIL_SPOOL=yes diff --git a/src/useradd.c b/src/useradd.c index 107e65f85..63e02ee0c 100644 --- a/src/useradd.c +++ b/src/useradd.c @@ -97,12 +97,12 @@ const char *Prog; /* * 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_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_create_mail_spool = "no"; +static const char *def_create_mail_spool = "yes"; static long def_inactive = -1; static const char *def_expire = "";