Messages in this thread |  | | | Date | Fri, 28 Mar 1997 16:03:44 +0000 (GMT) | | From | Bryn Paul Arnold Jones <> | | Subject | Re: Max users on Linux based FTP Site |
| |
On Wed, 26 Mar 1997, Wilfried Geis wrote:
> hello Linux users, > > We are a ISP in Germany and we're running a Linux based FTP Server. > There are user accounts for each customer to upload into their www > directory. Since we are rapidly growing I am curious if there exists an > upper limit of the size of the passwd or the number of possible users on > the linux box. Has anybody experience with that sort of constraints? > > Any help would be appreciated > > cheers
Hmm, don't know how this got onto linux-kernel, but .... the upper limit on the numbers of uid's you can have is 65536, because uid on linux is an unsigned short (0 to 2^16).
It's not a hard limit, but to remove it will be hard work, you'll have to find every definition of it's type:
cd /usr/include touch .emptyfile find . -type f -exec grep -n uid .emptyfile {} \; rm .emptyfile that goes to /use/include, creates an emptyfile (with only one filename grep, dosn't print the filename on matching files, so give it an empty file to force it). Find's all files (type f), and exec's grep with the '{}' replaced with each match found (ie everything under /usr/include that's a file). It then removes the empty file ;). You get this: ./gnu/types.h:41:typedef unsigned short __uid_t; /* Type of user identifications. */ ./gnu/types.h:52:typedef unsigned int __uid_t; /* Type of user identifications. */ ./rpc/auth.h:120: uid_t aup_uid; ./rpc/auth.h:170: * AUTH *authunix_create(machname, uid, gid, len, aup_gids) ./rpc/auth.h:172: * int uid; ./rpc/auth.h:177:extern AUTH *authunix_create __P((char * __machine, uid_t __uid, gid_t __gid, ./rpc/auth.h:191:#define AUTH_UNIX 1 /* unix style (uid, gids) */ The first match is the important one, change that, and that should be it (I have three definitions of it's type, two are in <gnu/types.h>, and one in <_G_config.h>) if you look at <gnu/types.h>, it should be obvious why the second is unimportant. All you have to do then is rebuild _every_ program that uses uids .... if you change the type to unsigned int, you'll have 4294967296 uid's. I think that'll be enough, at least until you start expanding into China ...
> -- > =============================================== > Wilfried Geis Seitz GmbH > willi@seitz.de Pforzheim > Webmaster & Support Tel. 07231/584-200 > =============================================== > Bryn -- PGP key pass phrase forgotten, \ Overload -- core meltdown sequence again :( and I don't care ;) | initiated. / This space is intentionally left | blank, apart from this text ;-) \____________________________________
|  |