From f79af1e7433f6ce6995e791520ac4c7fdc79a456 Mon Sep 17 00:00:00 2001 From: "yuhuan.yang" Date: Wed, 24 Jan 2018 13:22:45 +0800 Subject: Use SHA512 instead of MD5 to encrypt root password Change-Id: I646334220703dedc28b7b1286e28e01ef4c485de (cherry picked from commit 707754fa61eb4ae452e3af267e14290552122549) --- mic/kickstart/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mic/kickstart/__init__.py b/mic/kickstart/__init__.py index fd2806d..75678ad 100755 --- a/mic/kickstart/__init__.py +++ b/mic/kickstart/__init__.py @@ -265,7 +265,7 @@ class RootPasswordConfig(KickstartConfig): p1 = subprocess.Popen(["/bin/echo", "root:%s" %password], stdout = subprocess.PIPE, preexec_fn = self.chroot) - p2 = subprocess.Popen(["/usr/sbin/chpasswd", "-m"], + p2 = subprocess.Popen(["/usr/sbin/chpasswd", "-c","SHA512"], stdin = p1.stdout, stdout = subprocess.PIPE, preexec_fn = self.chroot) -- cgit v1.2.3