From dba42986a04d5b5a9d4926d65479744812c00f3f Mon Sep 17 00:00:00 2001 From: Radostin Stoyanov Date: Sat, 26 Aug 2017 21:42:02 +0100 Subject: Simplify setting permissions of shadow file --- src/virtBootstrap/utils.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/virtBootstrap/utils.py b/src/virtBootstrap/utils.py index ea650fb..be9133c 100644 --- a/src/virtBootstrap/utils.py +++ b/src/virtBootstrap/utils.py @@ -387,8 +387,7 @@ def set_root_password_in_rootfs(rootfs, password): shadow_file_permissions = os.stat(shadow_file)[0] # Set read-write permissions to shadow file - # 438 = 0110110110 = -rw-rw-rw- - os.chmod(shadow_file, 438) + os.chmod(shadow_file, 0o666) try: with open(shadow_file) as orig_file: shadow_content = orig_file.read().split('\n') -- cgit