From mboxrd@z Thu Jan 1 00:00:00 1970 From: ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org (Eric W. Biederman) Subject: Re: [PATCH 00/11] pkg-shadow support subordinate ids with user namespaces Date: Mon, 25 Feb 2013 17:03:34 -0800 Message-ID: <87ehg3sx7d.fsf@xmission.com> References: <87d2wxshu0.fsf@xmission.com> <51276189.5040803@parallels.com> <87zjyw489z.fsf@xmission.com> <5127A657.3010909@parallels.com> <20130225143451.GE4387@sergelap> <512B7773.9060704@parallels.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <512B7773.9060704-bzQdu9zFT3WakBO8gow8eQ@public.gmane.org> (Glauber Costa's message of "Mon, 25 Feb 2013 18:38:43 +0400") List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: containers-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Glauber Costa Cc: Pkg-shadow-devel-XbBxUvOt3X2LieD7tvxI8l/i77bcL1HB@public.gmane.org, Linux Containers , Serge Hallyn , "Michael Kerrisk (man-pages)" , Nicolas =?utf-8?Q?Fran=C3=A7ois?= List-Id: containers.vger.kernel.org Glauber Costa writes: > Well, the main problem is that I don't talk on behalf of any distro. We > distribute OpenVZ, and would like to create containers such that each > container has its own user range - all that without having the > containers users conflicting with users created by useradd's normal > operation. > > I am *hoping* that by selecting ranges high enough I will avoid > conflicts at least in the beginning, but it is a bit of guesswork. Two suggestions. 1) Use /etc/subuid even if the disto doesn't yet. Where in your case you reserve the subordinate uids for root. 2) The default range for normal uids is 1000 - 60000. The default range for subordinate uids is 100000- 600100000. That leaves most of the uids between 600100000 and 4294967296 unclaimed, while leaving enough that each user can have 10000 subordinate uids by default. Eric