Correctly edit /etc/subuid file

This commit is contained in:
Anthony Wang 2021-12-11 15:28:13 -06:00
parent 59165f9ae8
commit 789cdf5365
Signed by: a
GPG key ID: BC96B00AEC5F2D76

6
setid
View file

@ -4,9 +4,9 @@
# https://wiki.archlinux.org/title/Podman#Set_subuid_and_subgid
ids = ''
for uid in range(1000, 2000):
start = str(int(uid) * 10**5)
end = str(int(start) + 65535) # Allocate 65536 UIDs
ids += str(uid) + ':' + start + ':' + end + '\n'
start = uid * 10**5
num = 65536 # Allocate 65536 UIDs
ids += str(uid) + ':' + str(start) + ':' + str(num) + '\n'
# Save to system files
with open('/etc/subuid', 'w') as f: