docker: randomize root password and lock root account in %post
This commit is contained in:
parent
c78d46f6ee
commit
c3ffcf9114
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user