docker: randomize root password and lock root account in %post

This commit is contained in:
Chris St. Pierre 2014-03-28 09:00:33 -04:00
parent c78d46f6ee
commit c3ffcf9114

View File

@ -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