diff -up shadow-4.12.3/src/useradd.c.redhat shadow-4.12.3/src/useradd.c --- shadow-4.12.3/src/useradd.c.redhat 2022-08-06 18:22:45.000000000 +0200 +++ shadow-4.12.3/src/useradd.c 2022-08-22 15:57:19.034664441 +0200 @@ -82,7 +82,7 @@ const char *Prog; static gid_t def_group = 1000; static const char *def_gname = "other"; static const char *def_home = "/home"; -static const char *def_shell = "/bin/bash"; +static const char *def_shell = "/sbin/nologin"; static const char *def_template = SKEL_DIR; static const char *def_create_mail_spool = "yes"; static const char *def_log_init = "yes"; @@ -93,7 +93,7 @@ static const char *def_expire = ""; #define VALID(s) (strcspn (s, ":\n") == strlen (s)) static const char *user_name = ""; -static const char *user_pass = "!"; +static const char *user_pass = "!!"; static uid_t user_id; static gid_t user_gid; static const char *user_comment = ""; @@ -1227,7 +1227,7 @@ static void process_flags (int argc, cha {NULL, 0, NULL, '\0'} }; while ((c = getopt_long (argc, argv, - "b:c:d:De:f:g:G:hk:K:lmMNop:rR:P:s:u:U" + "b:c:d:De:f:g:G:hk:K:lmMnNop:rR:P:s:u:U" #ifdef WITH_SELINUX "Z:" #endif /* WITH_SELINUX */ @@ -1395,6 +1395,7 @@ static void process_flags (int argc, cha case 'M': Mflg = true; break; + case 'n': case 'N': Nflg = true; break;