]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
useradd: use built-in settings by default 299/head
authorLudwig Nussel <ludwig.nussel@suse.de>
Thu, 3 Dec 2020 17:05:59 +0000 (18:05 +0100)
committerLudwig Nussel <ludwig.nussel@suse.de>
Fri, 4 Dec 2020 08:20:18 +0000 (09:20 +0100)
Avoids installing inconsistent settings. The correct ones would be
written as soon as an admin uses useradd -D to modify the defaults.

etc/Makefile.am
etc/useradd [deleted file]
src/useradd.c

index cc31c609d33d11ab0d0abe64478199f55c06b14b..c5c0620bf425093d860bb54c0660bed7473393b2 100644 (file)
@@ -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 (file)
index b77dd85..0000000
+++ /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
index 107e65f8503d9404a639c0d3822a15e075a96d45..63e02ee0c888fbdc314d055a2356b4e39bf4f0c8 100644 (file)
@@ -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 = "";