shadow: Remove encrypted passwd for useradd-groupadd-groupmod-usermod
Remove encrypted passwd for useradd/groupadd/groupmod/usermod In groupadd/useradd, p parameter does not meet password complexity checks. Do not satisfy security requirements. Signed-off-by: xiongshenglan <xiongshenglan@huawei.com>
This commit is contained in:
parent
e024307bdc
commit
2cf1b7d0f3
@ -105,17 +105,17 @@ diff --git a/src/usermod.c b/src/usermod.c
|
|||||||
index ca8db92..509a50b 100644
|
index ca8db92..509a50b 100644
|
||||||
--- a/src/usermod.c
|
--- a/src/usermod.c
|
||||||
+++ b/src/usermod.c
|
+++ b/src/usermod.c
|
||||||
@@ -435,7 +435,9 @@ static /*@noreturn@*/void usage (int status)
|
@@ -384,7 +384,9 @@ static /*@noreturn@*/void usage (int status)
|
||||||
(void) fputs (_(" -m, --move-home move contents of the home directory to the\n"
|
(void) fputs (_(" -m, --move-home move contents of the home directory to the\n"
|
||||||
" new location (use only with -d)\n"), usageout);
|
" new location (use only with -d)\n"), usageout);
|
||||||
(void) fputs (_(" -o, --non-unique allow using duplicate (non-unique) UID\n"), usageout);
|
(void) fputs (_(" -o, --non-unique allow using duplicate (non-unique) UID\n"), usageout);
|
||||||
+#ifndef CONFIG_SHADOW_REMOVE_POPTION
|
+#ifndef CONFIG_SHADOW_REMOVE_POPTION
|
||||||
(void) fputs (_(" -p, --password PASSWORD use encrypted password for the new password\n"), usageout);
|
(void) fputs (_(" -p, --password PASSWORD use encrypted password for the new password\n"), usageout);
|
||||||
+#endif
|
+#endif
|
||||||
(void) fputs (_(" -R, --root CHROOT_DIR directory to chroot into\n"), usageout);
|
|
||||||
(void) fputs (_(" -P, --prefix PREFIX_DIR prefix directory where are located the /etc/* files\n"), usageout);
|
(void) fputs (_(" -P, --prefix PREFIX_DIR prefix directory where are located the /etc/* files\n"), usageout);
|
||||||
(void) fputs (_(" -s, --shell SHELL new login shell for the user account\n"), usageout);
|
(void) fputs (_(" -r, --remove remove the user from only the supplemental GROUPS\n"
|
||||||
@@ -1152,10 +1154,12 @@ static void process_flags (int argc, char **argv)
|
" mentioned by the -G option without removing\n"
|
||||||
|
@@ -1121,10 +1123,12 @@ static void process_flags (int argc, char **argv)
|
||||||
case 'o':
|
case 'o':
|
||||||
oflg = true;
|
oflg = true;
|
||||||
break;
|
break;
|
||||||
@ -125,9 +125,9 @@ index ca8db92..509a50b 100644
|
|||||||
pflg = true;
|
pflg = true;
|
||||||
break;
|
break;
|
||||||
+#endif
|
+#endif
|
||||||
case 'R': /* no-op, handled in process_root_flag () */
|
case 'r':
|
||||||
|
rflg = true;
|
||||||
break;
|
break;
|
||||||
case 'P': /* no-op, handled in process_prefix_flag () */
|
|
||||||
--
|
--
|
||||||
2.12.3
|
2.12.3
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user