From: Nikos Skalkotos Date: Fri, 1 Nov 2013 09:03:23 +0000 (+0200) Subject: Remove backup file for shadow X-Git-Tag: 0.6~1^2~10 X-Git-Url: https://code.grnet.gr/git/snf-image-creator/commitdiff_plain/7b626c6b6ce05fdd4a64b0d0de49ebc48b98cbaf?ds=sidebyside Remove backup file for shadow In Linux when clearing out the account, remove the backup file: /etc/shadow- --- diff --git a/image_creator/os_type/linux.py b/image_creator/os_type/linux.py index f320519..53e8a5a 100644 --- a/image_creator/os_type/linux.py +++ b/image_creator/os_type/linux.py @@ -116,6 +116,9 @@ class Linux(Unix): self.image.g.write('/etc/shadow', "\n".join(shadow) + '\n') + # Remove backup file for /etc/shadow + self.image.g.rm_rf('/etc/shadow-') + @sysprep('Fixing acpid powerdown action') def fix_acpid(self): """Replace acpid powerdown action scripts to immediately shutdown the