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