Date: Mon, 06 Aug 2001 17:11:05 +0200 From: Christoph Sold <so@i-clue.de> To: Joe McGuckin <joe@monk.via.net> Cc: questions@FreeBSD.ORG Subject: Re: Largest UID value ? Message-ID: <3B6EB389.97E0CFE3@i-clue.de> References: <200108042052.f74KqHM82410@monk.via.net>
next in thread | previous in thread | raw e-mail | index | archive | help
Joe McGuckin wrote: > > What is the largest legitimate user id value? > > getpwent() returns a uid_t which is a 32 bit unsigned it. > > But, user 'nobody' (which historically had a user id of -1) has a > user id of 65534. This is because the 32 bit signed integer -1 has exactly the same bit pattern than 32 bit unsigned int 65534. It's only a different interpretation of that bit pattern. > Will it break things if I start adding users with uid's greater > than 65536 ? Even 65536 will break things, as this is greater than MAXINT for unsigned 32 bit integer values. For organizational reasons, small negative values (which translate to values betwenn 65k and MAXINT) should also be avoided. Thus, as a rule of thumb, UIDs should stay below 65500. HTH -Christoph Sold 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?3B6EB389.97E0CFE3>