From owner-freebsd-questions Sun Apr 12 08:23:36 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id IAA16559 for freebsd-questions-outgoing; Sun, 12 Apr 1998 08:23:36 -0700 (PDT) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from indigo.ie (nsmart@ts01-62.waterford.indigo.ie [194.125.139.125]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id IAA16554 for ; Sun, 12 Apr 1998 08:23:30 -0700 (PDT) (envelope-from rotel@indigo.ie) Received: (from nsmart@localhost) by indigo.ie (8.8.8/8.8.7) id QAA01138; Sun, 12 Apr 1998 16:23:56 +0100 (IST) (envelope-from rotel@indigo.ie) From: Niall Smart Message-Id: <199804121523.QAA01138@indigo.ie> Date: Sun, 12 Apr 1998 16:23:55 +0000 In-Reply-To: Steve Hovey "more than 32k users" (Apr 11, 8:56pm) Reply-To: rotel@indigo.ie X-Mailer: Mail User's Shell (7.2.6 beta(3) 11/17/96) To: Steve Hovey , freebsd-questions@FreeBSD.ORG Subject: Re: more than 32k users Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Apr 11, 8:56pm, Steve Hovey wrote: } Subject: more than 32k users > > I know this has been asked before, but Ill be dipped if I can find the > answer. > > Is it possible to increase the maximum number of unix ids over 32k so that > one can have over 32k users in /etc/passwd? >From looking at the header files I see that uid_t (the data type used to represent the UID in the kernel and elsewhere) is an unsigned 32 bit integer meaning that this is possible in theory as long as no programs have assumed anything about the size of uid_t. pwd_mkdb doesn't like UID's > USHRT_MAX, but will allow you to use them. I have created a user with UID = 100000, and it certainly doesn't break anything instaneously :) [root@ginseng /etc]# tail -1 /etc/passwd foo:*:100000:100000:Niall Smart,Somewhere Someplace:/home/nsmart:/usr/local/bin/zsh [root@ginseng /etc]# su foo [foo@ginseng /etc]$ id uid=100000(foo) gid=100000 groups=100000 You might like to ask in -hackers about this, if you're in an environment where you can experiment with this then I'd so go ahead and try it. Beware that any programs which do not use uid_t portably (i.e. assume it can only go up to 65536) will probably have security problems if you use uid's > 65536 because the variable they store the UID in will wrap around. So, in summary, there is nothing preventing this on the kernel side and correctly written programs should handle it, but be careful - try and find someone else who is doing this! :) Niall -- Niall Smart. Microsoft Suck. See www.freebsd.org for details. echo "#define if(x) if(!(x))" >> /usr/include/stdio.h To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message