16 lines
353 B
Python
Executable file
16 lines
353 B
Python
Executable file
#!/usr/bin/python
|
|
|
|
# Set up subuid and subgid for rootless Podman
|
|
# https://wiki.archlinux.org/title/Podman#Set_subuid_and_subgid
|
|
|
|
|
|
ids = ''
|
|
for uid in range(1000, 2000):
|
|
ids += f'{uid}:{(uid - 999) * 10**5}:{65536}\n'
|
|
|
|
# Save to system files
|
|
with open('/etc/subuid', 'w') as f:
|
|
f.write(ids)
|
|
with open('/etc/subgid', 'w') as f:
|
|
f.write(ids)
|