From 7b626c6b6ce05fdd4a64b0d0de49ebc48b98cbaf Mon Sep 17 00:00:00 2001 From: Nikos Skalkotos Date: Fri, 1 Nov 2013 11:03:23 +0200 Subject: [PATCH] Remove backup file for shadow In Linux when clearing out the account, remove the backup file: /etc/shadow- --- image_creator/os_type/linux.py | 3 +++ 1 file changed, 3 insertions(+) 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 -- 1.7.10.4