b95810
diff -up shadow-4.6/src/useradd.c.redhat shadow-4.6/src/useradd.c
b95810
--- shadow-4.6/src/useradd.c.redhat	2018-04-29 18:42:37.000000000 +0200
b95810
+++ shadow-4.6/src/useradd.c	2018-05-28 13:37:16.695651258 +0200
b95810
@@ -98,7 +98,7 @@ const char *Prog;
9f90df
 static gid_t def_group = 100;
9f90df
 static const char *def_gname = "other";
9f90df
 static const char *def_home = "/home";
9f90df
-static const char *def_shell = "";
9f90df
+static const char *def_shell = "/sbin/nologin";
9f90df
 static const char *def_template = SKEL_DIR;
9f90df
 static const char *def_create_mail_spool = "no";
9f90df
 
b95810
@@ -108,7 +108,7 @@ static const char *def_expire = "";
9f90df
 #define	VALID(s)	(strcspn (s, ":\n") == strlen (s))
9f90df
 
9f90df
 static const char *user_name = "";
9f90df
-static const char *user_pass = "!";
9f90df
+static const char *user_pass = "!!";
9f90df
 static uid_t user_id;
9f90df
 static gid_t user_gid;
9f90df
 static const char *user_comment = "";
b95810
@@ -1114,9 +1114,9 @@ static void process_flags (int argc, cha
9f90df
 		};
9f90df
 		while ((c = getopt_long (argc, argv,
9f90df
 #ifdef WITH_SELINUX
b95810
-		                         "b:c:d:De:f:g:G:hk:K:lmMNop:rR:P:s:u:UZ:",
b95810
+		                         "b:c:d:De:f:g:G:hk:K:lmMnNop:rR:P:s:u:UZ:",
9f90df
 #else				/* !WITH_SELINUX */
b95810
-		                         "b:c:d:De:f:g:G:hk:K:lmMNop:rR:P:s:u:U",
b95810
+		                         "b:c:d:De:f:g:G:hk:K:lmMnNop:rR:P:s:u:U",
9f90df
 #endif				/* !WITH_SELINUX */
9f90df
 		                         long_options, NULL)) != -1) {
9f90df
 			switch (c) {
b95810
@@ -1267,6 +1267,7 @@ static void process_flags (int argc, cha
9f90df
 			case 'M':
9f90df
 				Mflg = true;
9f90df
 				break;
9f90df
+			case 'n':
9f90df
 			case 'N':
9f90df
 				Nflg = true;
9f90df
 				break;