From c3ffcf91146527f668c0d61b329548631423ae3b Mon Sep 17 00:00:00 2001 From: "Chris St. Pierre" Date: Fri, 28 Mar 2014 09:00:33 -0400 Subject: [PATCH] docker: randomize root password and lock root account in %post --- docker/docker-6.ks | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docker/docker-6.ks b/docker/docker-6.ks index 51cc75f..d71e81d 100644 --- a/docker/docker-6.ks +++ b/docker/docker-6.ks @@ -65,6 +65,10 @@ reboot %end %post +# randomize root password and lock root account +tr -cd '[:alnum:]' < /dev/urandom | fold -w30 | head -n1 | passwd --stdin root +passwd -l root + # cleanup unwanted stuff # ami-creator requires grub during the install, so we remove it (and