Date: Sun, 12 Apr 1998 16:23:55 +0000 From: Niall Smart <rotel@indigo.ie> To: Steve Hovey <shovey@buffnet.net>, freebsd-questions@FreeBSD.ORG Subject: Re: more than 32k users Message-ID: <199804121523.QAA01138@indigo.ie> In-Reply-To: Steve Hovey <shovey@buffnet.net> "more than 32k users" (Apr 11, 8:56pm)
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199804121523.QAA01138>