useradd: suggest --badnames when given a bad name

Closes #266
This commit is contained in:
Serge Hallyn 2020-07-31 21:29:21 -05:00
parent 607f1dd549
commit 7ea342579e

View File

@ -1500,7 +1500,7 @@ static void process_flags (int argc, char **argv)
user_name = argv[optind]; user_name = argv[optind];
if (!is_valid_user_name (user_name)) { if (!is_valid_user_name (user_name)) {
fprintf (stderr, fprintf (stderr,
_("%s: invalid user name '%s'\n"), _("%s: invalid user name '%s': use --badname to ignore\n"),
Prog, user_name); Prog, user_name);
#ifdef WITH_AUDIT #ifdef WITH_AUDIT
audit_logger (AUDIT_ADD_USER, Prog, audit_logger (AUDIT_ADD_USER, Prog,