Remove backup file for shadow
authorNikos Skalkotos <skalkoto@grnet.gr>
Fri, 1 Nov 2013 09:03:23 +0000 (11:03 +0200)
committerNikos Skalkotos <skalkoto@grnet.gr>
Fri, 1 Nov 2013 09:03:23 +0000 (11:03 +0200)
In Linux when clearing out the account, remove the backup file:
/etc/shadow-

image_creator/os_type/linux.py

index f320519..53e8a5a 100644 (file)
@@ -116,6 +116,9 @@ class Linux(Unix):
 
         self.image.g.write('/etc/shadow', "\n".join(shadow) + '\n')
 
 
         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
     @sysprep('Fixing acpid powerdown action')
     def fix_acpid(self):
         """Replace acpid powerdown action scripts to immediately shutdown the