unprivileged container questions - uid range on host

hxdai

Member
Oct 3, 2019
4
1
8
Hi,
I have a question regarding UID/GID mapping for unprivileged containers after reading the wiki page(https://pve.proxmox.com/wiki/Unprivileged_LXC_containers):

1: Document says for a lxc, its uid/gid is mapped to host uid/gid starting at 100000. If I create 2 containers(call them ct0 and ct1), would ct1's uid/gid also map to host uid/gid starting at 100000? or would it follow ct0's range? i.e. is the following table correct?
containercontainer uid/gidhost uid/gid
ct00 - 65535100000 - 165535
ct10 - 65535165536 - 231071
 
I see. Is it possible to map container's root(uid 0) to a normal user(uid 1000) in host? I tried that using lxc.idmap, container starts, but I wasn't able to login to container as root for some reason...
 
I see. Is it possible to map container's root(uid 0) to a normal user(uid 1000) in host? I tried that using lxc.idmap, container starts, but I wasn't able to login to container as root for some reason...
That should work the same way like its done in the linked wiki article (just with other numbers).
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!