generated from amazon-archives/__template_MIT-0
-
Notifications
You must be signed in to change notification settings - Fork 7
Open
Description
the script create_users_groups_json.py creates subuid and subgid files. The subuid files are of the correct format, but the subgid files are not. The subgid files are created based on the group names from the /etc/group (or wherever group files are defined in this program).
The format of the /etc/subgid file is of the form
<username>:<start_gid>:<count>
Just like the subuid file. In fact, it is my understanding that usually the /etc/subuid and /etc/subgid file are the same.
I think the code in create_users_groups_json.py for subgid creation needs to be updated to either copy the created subuid to subgid, or just create it the same way. I have modified the subgid file creation section from:
subgid_fh = open(subgid_filename, 'w')
next_gid = 65536
for gid in config['gids']:
subgid_fh.write(f"# {config['gids'][gid]}" + "\n")
subgid_fh.write(f"{gid}:{next_gid}:65536" + "\n")
next_gid += 65536
subgid_fh.close()
to:
import shutil
shutil.copy(subuid_filename, subgid_filename)
Metadata
Metadata
Assignees
Labels
No labels